diff mbox series

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

Message ID 20210405110952.17679-10-anton@khirnov.net
State Accepted
Commit 04feb1c0382104c36d2297a277ffd1450d016d35
Headers show
Series [FFmpeg-devel,01/17] lavu: postpone child_class_next API removal | expand


Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Anton Khirnov April 5, 2021, 11:09 a.m. UTC
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 mbox series


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