]> git.sesse.net Git - ffmpeg/commitdiff
lavf: do not derive timebase from avg_frame_rate
authorAnton Khirnov <anton@khirnov.net>
Mon, 5 Apr 2021 08:47:10 +0000 (10:47 +0200)
committerAnton Khirnov <anton@khirnov.net>
Thu, 8 Apr 2021 09:03:15 +0000 (11:03 +0200)
avg_frame_rate is the _average_ framerate, its presence does not
guarantee that the stream is CFR, so it should not be used for setting
the timebase.

libavformat/utils.c

index b671fa75b31187a4af01c3fe8293ecdba37ed191..d9971d7fd3bf497263e25b72685d6b6ce931a729 100644 (file)
@@ -5892,9 +5892,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
         enc_ctx->time_base = dec_ctx->time_base;
     }
 
-    if (ost->avg_frame_rate.num)
-        enc_ctx->time_base = av_inv_q(ost->avg_frame_rate);
-
     av_reduce(&enc_ctx->time_base.num, &enc_ctx->time_base.den,
               enc_ctx->time_base.num, enc_ctx->time_base.den, INT_MAX);