summaryrefslogtreecommitdiff
path: root/libavcodec/qsv.c
diff options
context:
space:
mode:
authorZhong Li <zhong.li@intel.com>2018-05-09 14:07:40 +0800
committerZhong Li <zhong.li@intel.com>2018-06-13 00:13:24 +0800
commit8a0c2901f1fa1cd4b2cf8f347840e4465d65cbae (patch)
treeeec60da64f5470fadd61aa1c089a7d9b568e919d /libavcodec/qsv.c
parent238a8ae92fc74fa0f0ac15db5f0fec464db5db7c (diff)
lavc/qsv: suppress code scan complain
Suppress the complain "variables 'type' is used but maybe uninitialized".
Diffstat (limited to 'libavcodec/qsv.c')
-rw-r--r--libavcodec/qsv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index 45e1c25c68..3ff4f2c092 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -31,6 +31,7 @@
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_qsv.h"
#include "libavutil/imgutils.h"
+#include "libavutil/avassert.h"
#include "avcodec.h"
#include "qsv_internal.h"
@@ -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 type;
+ enum AVPictureType type = AV_PICTURE_TYPE_NONE;
switch (mfx_pic_type & 0x7) {
case MFX_FRAMETYPE_I:
if (mfx_pic_type & MFX_FRAMETYPE_S)
@@ -214,6 +215,8 @@ enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type)
else
type = AV_PICTURE_TYPE_P;
break;
+ default:
+ av_assert0(0);
}
return type;