diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-19 14:56:09 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-19 15:36:59 +0200 |
commit | 2dbaec690d9f8e25e12b80e1162097e96b30ddc8 (patch) | |
tree | 8b0241d9a8e4e1d5b4c1a72302b06c871c990af4 | |
parent | bc3f19641ce37d14f9cfd7e2693c4833b63fba7d (diff) | |
download | ffmpeg-2dbaec690d9f8e25e12b80e1162097e96b30ddc8.tar.gz |
ffmpeg_filter: Check that filters have connected outputs before accessing the output stream
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | ffmpeg_filter.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c index b452fe0682..950e4d02e9 100644 --- a/ffmpeg_filter.c +++ b/ffmpeg_filter.c @@ -641,6 +641,11 @@ int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOu av_freep(&ofilter->name); DESCRIBE_FILTER_LINK(ofilter, out, 0); + if (!ofilter->ost) { + av_log(NULL, AV_LOG_FATAL, "Filter %s has a unconnected output\n", ofilter->name); + exit_program(1); + } + switch (avfilter_pad_get_type(out->filter_ctx->output_pads, out->pad_idx)) { case AVMEDIA_TYPE_VIDEO: return configure_output_video_filter(fg, ofilter, out); case AVMEDIA_TYPE_AUDIO: return configure_output_audio_filter(fg, ofilter, out); |