History

Check linked pads media type mismatch in avfilter_link().

Originally committed as revision 26325 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 15 years ago

Commit 891aeee1 parent 8b69c2f1 file · +7 −0Browse files

Unified · Split

libavfilter/avfilter.c+7−0
@@ -107,6 +107,13 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, · 106 unmodified lines
107107 src->outputs[srcpad] || dst->inputs[dstpad])
108108 return -1;
109109
110+ if (src->output_pads[srcpad].type != dst->input_pads[dstpad].type) {
111+ av_log(src, AV_LOG_ERROR,
112+ "Media type mismatch between the '%s' filter output pad %d and the '%s' filter input pad %d\n",
113+ src->name, srcpad, dst->name, dstpad);
114+ return AVERROR(EINVAL);
115+ }
116+
110117 src->outputs[srcpad] =
111118 dst-> inputs[dstpad] = link = av_mallocz(sizeof(AVFilterLink));
112119

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t