Make link_filter() propagate the generated error code.
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Thu, 22 Jul 2010 09:55:57 +0000 (09:55 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Thu, 22 Jul 2010 09:55:57 +0000 (09:55 +0000)
Originally committed as revision 24419 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavfilter/graphparser.c

index 21ed1f2..7cf320f 100644 (file)
@@ -34,11 +34,12 @@ static int link_filter(AVFilterContext *src, int srcpad,
                        AVFilterContext *dst, int dstpad,
                        AVClass *log_ctx)
 {
-    if (avfilter_link(src, srcpad, dst, dstpad)) {
+    int ret;
+    if ((ret = avfilter_link(src, srcpad, dst, dstpad))) {
         av_log(log_ctx, AV_LOG_ERROR,
                "cannot create the link %s:%d -> %s:%d\n",
                src->filter->name, srcpad, dst->filter->name, dstpad);
-        return -1;
+        return ret;
     }
 
     return 0;