Commit 8a0c2901 authored by Zhong Li's avatar Zhong Li

lavc/qsv: suppress code scan complain

Suppress the complain "variables 'type' is used but maybe uninitialized".
parent 238a8ae9
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "libavutil/hwcontext.h" #include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_qsv.h" #include "libavutil/hwcontext_qsv.h"
#include "libavutil/imgutils.h" #include "libavutil/imgutils.h"
#include "libavutil/avassert.h"
#include "avcodec.h" #include "avcodec.h"
#include "qsv_internal.h" #include "qsv_internal.h"
...@@ -197,7 +198,7 @@ int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame) ...@@ -197,7 +198,7 @@ int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame)
enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type) 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) { switch (mfx_pic_type & 0x7) {
case MFX_FRAMETYPE_I: case MFX_FRAMETYPE_I:
if (mfx_pic_type & MFX_FRAMETYPE_S) if (mfx_pic_type & MFX_FRAMETYPE_S)
...@@ -214,6 +215,8 @@ enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type) ...@@ -214,6 +215,8 @@ enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type)
else else
type = AV_PICTURE_TYPE_P; type = AV_PICTURE_TYPE_P;
break; break;
default:
av_assert0(0);
} }
return type; return type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment