fftools/ffmpeg_enc: do not guess frame durations from output framerate

There is no reason to expect input frame durations to match output
framerate.
This commit is contained in:
Anton Khirnov 2023-05-28 22:27:43 +02:00
parent 2f92650c5d
commit 5bea8daa78
1 changed files with 0 additions and 3 deletions

View File

@ -1042,9 +1042,6 @@ static void do_video_out(OutputFile *of, OutputStream *ost, AVFrame *frame)
if (frame)
duration = lrintf(frame->duration * av_q2d(frame->time_base) / av_q2d(enc->time_base));
if (duration <= 0 && ost->frame_rate.num)
duration = FFMIN(duration, 1/(av_q2d(ost->frame_rate) * av_q2d(enc->time_base)));
frame_rate = av_buffersink_get_frame_rate(filter);
if (duration <= 0 && frame_rate.num > 0 && frame_rate.den > 0)
duration = 1/(av_q2d(frame_rate) * av_q2d(enc->time_base));