diff mbox series

[FFmpeg-devel,1/6] ffmpeg: drop useless framerate assignments

Message ID 20211204174118.19085-1-anton@khirnov.net
State Accepted
Commit bb6f591c4938b98b748e43625a54015486a6ed94
Headers show
Series [FFmpeg-devel,1/6] ffmpeg: drop useless framerate assignments | expand


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Anton Khirnov Dec. 4, 2021, 5:41 p.m. UTC
If the input stream framerate is known, it will be configured on the
relevant filtergraph input and get propagated to the output stream in
the above line. That makes these assignments redundant.
 fftools/ffmpeg.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series


diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 47e6a8683e..1814941266 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -3296,10 +3296,6 @@  static int init_output_stream_encode(OutputStream *ost, AVFrame *frame)
     if (enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO) {
         if (!ost->frame_rate.num)
             ost->frame_rate = av_buffersink_get_frame_rate(ost->filter->filter);
-        if (ist && !ost->frame_rate.num)
-            ost->frame_rate = ist->framerate;
-        if (ist && !ost->frame_rate.num)
-            ost->frame_rate = ist->st->r_frame_rate;
         if (ist && !ost->frame_rate.num && !ost->max_frame_rate.num) {
             ost->frame_rate = (AVRational){25, 1};
             av_log(NULL, AV_LOG_WARNING,