diff mbox series

[FFmpeg-devel,12/23] fftools/ffmpeg_enc: do not guess frame durations from output framerate

Message ID 20230531145453.20994-12-anton@khirnov.net
State Accepted
Commit 5bea8daa787c99b0d7172d41a0749377fee934ed
Headers show
Series [FFmpeg-devel,01/23] fftools/ffmpeg_enc: move nb_frames{dup, drop} globals into OutputStream | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov May 31, 2023, 2:54 p.m. UTC
There is no reason to expect input frame durations to match output
framerate.
---
 fftools/ffmpeg_enc.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Paul B Mahol May 31, 2023, 3:16 p.m. UTC | #1
approved
diff mbox series

Patch

diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
index 4a5ae3aa1b..5be6e9332a 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -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));