aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-09-27 17:28:53 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-09-27 17:28:53 +0000
commitdb9dfa3cc360bdee4d571cfea5f468b3f1426b05 (patch)
tree8572a3b9c5ecc00e9909e38a9581cb2bff85fea5 /libavfilter
parent4ecf1539bf3cc8b2a2b76658917170de362402e5 (diff)
downloadffmpeg-db9dfa3cc360bdee4d571cfea5f468b3f1426b05.tar.gz
Make avfilter_insert_filter() propagate an error code in case the
called avfilter_link() fails. Originally committed as revision 25229 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avfilter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 4c61bf436e..9e1940be8f 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -124,6 +124,7 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad,
int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
unsigned in, unsigned out)
{
+ int ret;
unsigned dstpad_idx = link->dstpad - link->dst->input_pads;
av_log(link->dst, AV_LOG_INFO, "auto-inserting filter '%s' "
@@ -131,10 +132,10 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
filt->name, link->src->name, link->dst->name);
link->dst->inputs[dstpad_idx] = NULL;
- if (avfilter_link(filt, out, link->dst, dstpad_idx)) {
+ if ((ret = avfilter_link(filt, out, link->dst, dstpad_idx)) < 0) {
/* failed to link output filter to new filter */
link->dst->inputs[dstpad_idx] = link;
- return -1;
+ return ret;
}
/* re-hookup the link to the new destination filter we inserted */