]> git.sesse.net Git - ffmpeg/commitdiff
ffmpeg: Dont crash on unconnected output pads before an error is printed
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 23 Oct 2013 09:39:43 +0000 (11:39 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 23 Oct 2013 09:39:43 +0000 (11:39 +0200)
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index 86b716224141cdcd3e9fdaa05005bcdaf4576a72..31482679f8f675622a17db4f912b295ecb7a2788 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2108,7 +2108,7 @@ static int transcode_init(void)
         FilterGraph *fg = filtergraphs[i];
         for (j = 0; j < fg->nb_outputs; j++) {
             OutputFilter *ofilter = fg->outputs[j];
-            if (ofilter->ost->source_index >= 0)
+            if (!ofilter->ost || ofilter->ost->source_index >= 0)
                 continue;
             if (fg->nb_inputs != 1)
                 continue;