[FFmpeg-devel,2/2] lavf/qsv_overlay: fix compiling warning

Submitted by Zhong Li on Nov. 15, 2017, 5:10 a.m.

Details

Message ID 1510722604-7874-2-git-send-email-zhong.li@intel.com
State New
Headers show

Commit Message

Zhong Li Nov. 15, 2017, 5:10 a.m.
fix the compiling warning of "ignoring return value"

Signed-off-by: Zhong Li <zhong.li@intel.com>
---
 libavfilter/vf_overlay_qsv.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavfilter/vf_overlay_qsv.c b/libavfilter/vf_overlay_qsv.c
index 1f50d4b..001a1c3 100644
--- a/libavfilter/vf_overlay_qsv.c
+++ b/libavfilter/vf_overlay_qsv.c
@@ -415,6 +415,7 @@  static void overlay_qsv_uninit(AVFilterContext *ctx)
 static int overlay_qsv_query_formats(AVFilterContext *ctx)
 {
     int i;
+    int ret;
 
     static const enum AVPixelFormat main_in_fmts[] = {
         AV_PIX_FMT_YUV420P,
@@ -431,9 +432,11 @@  static int overlay_qsv_query_formats(AVFilterContext *ctx)
     };
 
     for (i = 0; i < ctx->nb_inputs; i++)
-        ff_formats_ref(ff_make_format_list(main_in_fmts), &ctx->inputs[i]->out_formats);
+        if ((ret = ff_formats_ref(ff_make_format_list(main_in_fmts), &ctx->inputs[i]->out_formats)) < 0)
+	     return ret;
 
-    ff_formats_ref(ff_make_format_list(out_pix_fmts), &ctx->outputs[0]->in_formats);
+    if ((ret = ff_formats_ref(ff_make_format_list(out_pix_fmts), &ctx->outputs[0]->in_formats)) < 0)
+        return ret;
 
     return 0;
 }