[FFmpeg-devel] [PATCH 09/17] lavf: do not derive timebase from avg_frame_rate

Anton Khirnov anton at khirnov.net
Mon Apr 5 14:09:46 EEST 2021


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 | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 13b1bc7c78..e82954e0e1 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -5865,9 +5865,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);
 
-- 
2.30.2



More information about the ffmpeg-devel mailing list