diff mbox series

[FFmpeg-devel,02/10] fftools/ffmpeg: drop an arbitrary condition

Message ID 20221117101640.6789-2-anton@khirnov.net
State Accepted
Commit 50ecba7e8474966517cdd28c4ce9d9258e9b14e6
Headers show
Series [FFmpeg-devel,01/10] fftools/ffmpeg: move freeing an input stream into a separate function | expand

Checks

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

Commit Message

Anton Khirnov Nov. 17, 2022, 10:16 a.m. UTC
Encoding init code will currently fall back to a 25fps default when no
framerate is known or specified, but only if there is a known source
input stream. There is no good reason for this condition, so drop it.
---
 fftools/ffmpeg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 25155e155e..2c4dc83f03 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2877,7 +2877,7 @@  static int init_output_stream_encode(OutputStream *ost, AVFrame *frame)
     if (enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO) {
         if (!ost->frame_rate.num)
             ost->frame_rate = av_buffersink_get_frame_rate(ost->filter->filter);
-        if (ist && !ost->frame_rate.num && !ost->max_frame_rate.num) {
+        if (!ost->frame_rate.num && !ost->max_frame_rate.num) {
             ost->frame_rate = (AVRational){25, 1};
             av_log(NULL, AV_LOG_WARNING,
                    "No information "