aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-06-08 21:33:44 +0200
committerAnton Khirnov <anton@khirnov.net>2023-06-19 09:48:55 +0200
commitb1a213ab5d84085ae2b98452daa8feda01881cbf (patch)
treeb268b87cb768682294980d523c3ce2f3b668fa67
parenta7aa05c599fc013e967cc54f1ce0dbe16316235e (diff)
downloadffmpeg-b1a213ab5d84085ae2b98452daa8feda01881cbf.tar.gz
fftools/ffmpeg_filter: reject filtergraphs with zero outputs
Nothing useful can be done with them currently.
-rw-r--r--fftools/ffmpeg_filter.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 4f7565e44e..54c7ed1f5c 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -845,6 +845,12 @@ FilterGraph *fg_create(char *graph_desc)
ofilter->name = describe_filter_link(fg, cur, 0);
}
+ if (!fg->nb_outputs) {
+ av_log(fg, AV_LOG_FATAL, "A filtergraph has zero outputs, this is not supported\n");
+ ret = AVERROR(ENOSYS);
+ goto fail;
+ }
+
fail:
avfilter_inout_free(&inputs);
avfilter_inout_free(&outputs);