[libav-devel] [PATCH] lavc/qsv_overlay: suppress code scan complain

Zhong Li zhong.li at intel.com
Tue Jul 3 09:54:14 CEST 2018


Suppress the complain "variables 'pix_fmt' is used but maybe
uninitialized".

Signed-off-by: Zhong Li <zhong.li at intel.com>
---
 libavfilter/vf_overlay_qsv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_overlay_qsv.c b/libavfilter/vf_overlay_qsv.c
index 89f2fb1..33d50a5 100644
--- a/libavfilter/vf_overlay_qsv.c
+++ b/libavfilter/vf_overlay_qsv.c
@@ -162,7 +162,7 @@ release:
 
 static int have_alpha_planar(AVFilterLink *link)
 {
-    enum AVPixelFormat pix_fmt;
+    enum AVPixelFormat pix_fmt = link->format;
     const AVPixFmtDescriptor *desc;
     AVHWFramesContext *fctx;
 
-- 
2.7.4



More information about the libav-devel mailing list