OSDN Git Service

libavfilter/vf_hwdownload: show error when ff_formats_ref fails
authordsmudhar <ds.mudhar@gmail.com>
Sun, 22 May 2016 00:56:36 +0000 (06:26 +0530)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 24 May 2016 18:00:17 +0000 (20:00 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/vf_hwdownload.c

index 2dcc9fa..79ea82d 100644 (file)
@@ -56,8 +56,10 @@ static int hwdownload_query_formats(AVFilterContext *avctx)
         }
     }
 
-    ff_formats_ref(infmts,  &avctx->inputs[0]->out_formats);
-    ff_formats_ref(outfmts, &avctx->outputs[0]->in_formats);
+    if ((err = ff_formats_ref(infmts,  &avctx->inputs[0]->out_formats)) < 0 ||
+        (err = ff_formats_ref(outfmts, &avctx->outputs[0]->in_formats)) < 0)
+        return err;
+
     return 0;
 }