From 04d35004c3d050c0bede909e4d1b30f0dc379cfa Mon Sep 17 00:00:00 2001 From: dsmudhar Date: Sun, 22 May 2016 06:26:36 +0530 Subject: [PATCH] libavfilter/vf_hwdownload: show error when ff_formats_ref fails Signed-off-by: Michael Niedermayer --- libavfilter/vf_hwdownload.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c index 2dcc9fa059..79ea82d4ec 100644 --- a/libavfilter/vf_hwdownload.c +++ b/libavfilter/vf_hwdownload.c @@ -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; } -- 2.11.0