[FFmpeg-devel] [PATCH] lavc/qsv: suppress code scan complain

Zhong Li zhong.li at intel.com
Wed May 9 09:13:50 EEST 2018


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

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

diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index 45e1c25..b578da0 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -197,7 +197,7 @@ int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame)
 
 enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type)
 {
-    enum AVPictureType type;
+    enum AVPictureType type = AV_PICTURE_TYPE_NONE;
     switch (mfx_pic_type & 0x7) {
     case MFX_FRAMETYPE_I:
         if (mfx_pic_type & MFX_FRAMETYPE_S)
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list