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

Anton Khirnov anton at khirnov.net
Thu Aug 25 11:59:52 EEST 2022


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 --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,
-- 
2.35.1



More information about the ffmpeg-devel mailing list