ffmpeg_filter: Check that filters have connected outputs before accessing the output...
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 19 Jul 2015 12:56:09 +0000 (14:56 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 19 Jul 2015 13:36:59 +0000 (15:36 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
ffmpeg_filter.c

index b452fe0..950e4d0 100644 (file)
@@ -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);