From 04feb1c0382104c36d2297a277ffd1450d016d35 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 5 Apr 2021 10:47:10 +0200 Subject: 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. --- libavformat/utils.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'libavformat/utils.c') 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); -- cgit v1.2.3