[FFmpeg-cvslog] lavf: do not derive timebase from avg_frame_rate

Anton Khirnov git at videolan.org
Thu Apr 8 12:04:30 EEST 2021


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Apr  5 10:47:10 2021 +0200| [04feb1c0382104c36d2297a277ffd1450d016d35] | committer: Anton Khirnov

lavf: do not derive timebase from avg_frame_rate

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=04feb1c0382104c36d2297a277ffd1450d016d35
---

 libavformat/utils.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index b671fa75b3..d9971d7fd3 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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);
 



More information about the ffmpeg-cvslog mailing list