Merge commit 'a7e79f6a43bdc7e3b164dd78b060f0d5575a0cf0' into release/2.4
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 18 Jan 2015 00:11:20 +0000 (01:11 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 18 Jan 2015 00:11:20 +0000 (01:11 +0100)
* commit 'a7e79f6a43bdc7e3b164dd78b060f0d5575a0cf0':
  avfilter: check filter link validity

Conflicts:
libavfilter/avfilter.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavfilter/avfilter.c

@@@ -227,13 -150,14 +227,18 @@@ int avfilter_config_links(AVFilterConte
  
      for (i = 0; i < filter->nb_inputs; i ++) {
          AVFilterLink *link = filter->inputs[i];
 +        AVFilterLink *inlink;
  
          if (!link) continue;
+         if (!link->src || !link->dst) {
+             av_log(filter, AV_LOG_ERROR,
+                    "Not all input and output are properly linked (%d).\n", i);
+             return AVERROR(EINVAL);
+         }
  
 +        inlink = link->src->nb_inputs ? link->src->inputs[0] : NULL;
 +        link->current_pts = AV_NOPTS_VALUE;
 +
          switch (link->init_state) {
          case AVLINK_INIT:
              continue;