ffmpeg: Dont crash on unconnected output pads before an error is printed

Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/39/head
Michael Niedermayer 11 years ago
parent 435a730e21
commit b36257921e
  1. 2
      ffmpeg.c

@ -2108,7 +2108,7 @@ static int transcode_init(void)
FilterGraph *fg = filtergraphs[i]; FilterGraph *fg = filtergraphs[i];
for (j = 0; j < fg->nb_outputs; j++) { for (j = 0; j < fg->nb_outputs; j++) {
OutputFilter *ofilter = fg->outputs[j]; OutputFilter *ofilter = fg->outputs[j];
if (ofilter->ost->source_index >= 0) if (!ofilter->ost || ofilter->ost->source_index >= 0)
continue; continue;
if (fg->nb_inputs != 1) if (fg->nb_inputs != 1)
continue; continue;

Loading…
Cancel
Save