af_amerge: return errors from subfilters when requesting a frame
authorMatthieu Bouron <matthieu.bouron@smartjog.com>
Thu, 26 Apr 2012 15:43:00 +0000 (17:43 +0200)
committerNicolas George <nicolas.george@normalesup.org>
Thu, 26 Apr 2012 16:56:35 +0000 (18:56 +0200)
libavfilter/af_amerge.c

index c9b0f21..a160391 100644 (file)
@@ -141,11 +141,12 @@ static int request_frame(AVFilterLink *outlink)
 {
     AVFilterContext *ctx = outlink->src;
     AMergeContext *am = ctx->priv;
-    int i;
+    int i, ret;
 
     for (i = 0; i < 2; i++)
         if (!am->queue[i].nb_samples)
-            avfilter_request_frame(ctx->inputs[i]);
+            if ((ret = avfilter_request_frame(ctx->inputs[i])) < 0)
+                return ret;
     return 0;
 }