diff options
author | Zhong Li <zhong.li@intel.com> | 2018-07-03 16:01:30 +0800 |
---|---|---|
committer | Zhong Li <zhong.li@intel.com> | 2018-07-12 15:29:55 +0800 |
commit | 3c26ce464435673fe1c0e96a4d5f435b964db8d1 (patch) | |
tree | ca09ff926116585f2f43d3a72001ebef36475350 /libavcodec/qsv.c | |
parent | 3ce4034308a3726395a2c1b18a3dff3554e0b619 (diff) | |
download | ffmpeg-3c26ce464435673fe1c0e96a4d5f435b964db8d1.tar.gz |
lavc/qsv: handle MFX_FRAMETYPE_UNKNOWN case
Signed-off-by: Zhong Li <zhong.li@intel.com>
Diffstat (limited to 'libavcodec/qsv.c')
-rw-r--r-- | libavcodec/qsv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 3ff4f2c092..bb0d79588c 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -198,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 = AV_PICTURE_TYPE_NONE; + enum AVPictureType type; switch (mfx_pic_type & 0x7) { case MFX_FRAMETYPE_I: if (mfx_pic_type & MFX_FRAMETYPE_S) @@ -215,6 +215,9 @@ enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type) else type = AV_PICTURE_TYPE_P; break; + case MFX_FRAMETYPE_UNKNOWN: + type = AV_PICTURE_TYPE_NONE; + break; default: av_assert0(0); } |