[FFmpeg-cvslog] fftools/ffmpeg_filter: remove an always-false check

Anton Khirnov git at videolan.org
Mon Aug 29 16:42:35 EEST 2022


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Aug 25 09:40:42 2022 +0200| [c97bb940c28a49ec36d9e7f0514ed1c3403384a9] | committer: Anton Khirnov

fftools/ffmpeg_filter: remove an always-false check

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c97bb940c28a49ec36d9e7f0514ed1c3403384a9
---

 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,



More information about the ffmpeg-cvslog mailing list