Browse Source

Check linked pads media type mismatch in avfilter_link().

Originally committed as revision 26325 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Stefano Sabatini 15 years ago
parent
commit
891aeeee72
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      libavfilter/avfilter.c

+ 7
- 0
libavfilter/avfilter.c View File

@@ -107,6 +107,13 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad,
src->outputs[srcpad] || dst->inputs[dstpad])
return -1;

if (src->output_pads[srcpad].type != dst->input_pads[dstpad].type) {
av_log(src, AV_LOG_ERROR,
"Media type mismatch between the '%s' filter output pad %d and the '%s' filter input pad %d\n",
src->name, srcpad, dst->name, dstpad);
return AVERROR(EINVAL);
}

src->outputs[srcpad] =
dst-> inputs[dstpad] = link = av_mallocz(sizeof(AVFilterLink));



Loading…
Cancel
Save