diff mbox series

[FFmpeg-devel,2/6] fftools/ffmpeg_filter: remove an always-false check

Message ID 20220825085956.4790-2-anton@khirnov.net
State Accepted
Commit c97bb940c28a49ec36d9e7f0514ed1c3403384a9
Headers show
Series [FFmpeg-devel,1/6] fftools/ffmpeg: remove a stale extern declaration | expand

Commit Message

Anton Khirnov Aug. 25, 2022, 8:59 a.m. UTC
This code cannot be triggered, since after 90944ee3ab7 opening the
output file will abort if an encoder cannot be found and streamcopy was
not explicitly requested.
---
 fftools/ffmpeg_filter.c | 8 --------
 1 file changed, 8 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 16622e49c1..4e2787eba2 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -1095,14 +1095,6 @@  int configure_filtergraph(FilterGraph *fg)
 
     for (i = 0; i < fg->nb_outputs; i++) {
         OutputStream *ost = fg->outputs[i]->ost;
-        if (!ost->enc) {
-            /* identical to the same check in ffmpeg.c, needed because
-               complex filter graphs are initialized earlier */
-            av_log(NULL, AV_LOG_ERROR, "Encoder (codec %s) not found for output stream #%d:%d\n",
-                     avcodec_get_name(ost->st->codecpar->codec_id), ost->file_index, ost->index);
-            ret = AVERROR(EINVAL);
-            goto fail;
-        }
         if (ost->enc->type == AVMEDIA_TYPE_AUDIO &&
             !(ost->enc->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE))
             av_buffersink_set_frame_size(ost->filter->filter,