Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com>
---
 libavfilter/vf_hwdownload.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c
index 33af30cf40..ce10b60e59 100644
--- a/libavfilter/vf_hwdownload.c
+++ b/libavfilter/vf_hwdownload.c
@@ -55,11 +55,11 @@ static int hwdownload_query_formats(AVFilterContext *avctx)
         }
     }
 
-    if ((err = ff_formats_ref(infmts,  &avctx->inputs[0]->out_formats)) < 0 ||
-        (err = ff_formats_ref(outfmts, &avctx->outputs[0]->in_formats)) < 0)
+    if ((err = ff_formats_ref(infmts,  &avctx->inputs[0]->out_formats)) < 0) {
+        ff_formats_unref(&outfmts);
         return err;
-
-    return 0;
+    }
+    return ff_formats_ref(outfmts, &avctx->outputs[0]->in_formats);
 }
 
 static int hwdownload_config_input(AVFilterLink *inlink)
-- 
2.20.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to