Originally committed as revision 25229 to svn://svn.ffmpeg.org/ffmpeg/trunk
Showing the changes to libavfilter/avfilter.c (1 of 1 file). Show all
Unified · Split
| @@ -124,6 +124,7 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, · 123 unmodified lines | |||
| 124 | int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, | 124 | int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, |
| 125 | unsigned in, unsigned out) | 125 | unsigned in, unsigned out) |
| 126 | { | 126 | { |
| 127 | int ret; | ||
| 127 | unsigned dstpad_idx = link->dstpad - link->dst->input_pads; | 128 | unsigned dstpad_idx = link->dstpad - link->dst->input_pads; |
| 128 | 129 | ||
| 129 | av_log(link->dst, AV_LOG_INFO, "auto-inserting filter '%s' " | 130 | av_log(link->dst, AV_LOG_INFO, "auto-inserting filter '%s' " |
| @@ -131,10 +132,10 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, · 1 unmodified line | |||
| 131 | filt->name, link->src->name, link->dst->name); | 132 | filt->name, link->src->name, link->dst->name); |
| 132 | 133 | ||
| 133 | link->dst->inputs[dstpad_idx] = NULL; | 134 | link->dst->inputs[dstpad_idx] = NULL; |
| 134 | if (avfilter_link(filt, out, link->dst, dstpad_idx)) { | 135 | if ((ret = avfilter_link(filt, out, link->dst, dstpad_idx)) < 0) { |
| 135 | /* failed to link output filter to new filter */ | 136 | /* failed to link output filter to new filter */ |
| 136 | link->dst->inputs[dstpad_idx] = link; | 137 | link->dst->inputs[dstpad_idx] = link; |
| 137 | return -1; | 138 | return ret; |
| 138 | } | 139 | } |
| 139 | 140 | ||
| 140 | /* re-hookup the link to the new destination filter we inserted */ | 141 | /* re-hookup the link to the new destination filter we inserted */ |