1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

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.
This commit is contained in:
Anton Khirnov 2021-04-05 10:47:10 +02:00
parent 0214da22ca
commit 04feb1c038

View 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);