diff options
author | Linjie Fu <linjie.fu@intel.com> | 2018-11-28 10:41:55 +0800 |
---|---|---|
committer | Zhong Li <zhong.li@intel.com> | 2018-11-30 17:53:26 +0800 |
commit | 67cdfcf694f840d215be940f82545c45c9be193a (patch) | |
tree | 33110892c82ebf346edc310fab9a93db7441d0cb /libavcodec | |
parent | ac0bcd6b619479d56612b3938e8f00f5b88c0f10 (diff) | |
download | ffmpeg-67cdfcf694f840d215be940f82545c45c9be193a.tar.gz |
lavc/qsvenc: assert uninitialized pict_type
Assert in function ff_qsv_encode to avoid using uninitialized value:
FF_DISABLE_DEPRECATION_WARNINGS
avctx->coded_frame->pict_type = pict_type;
FF_ENABLE_DEPRECATION_WARNINGS
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/qsvenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 3946c1d837..7f4592f878 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -1337,6 +1337,8 @@ int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q, pict_type = AV_PICTURE_TYPE_P; else if (bs->FrameType & MFX_FRAMETYPE_B || bs->FrameType & MFX_FRAMETYPE_xB) pict_type = AV_PICTURE_TYPE_B; + else + av_assert0(!"Uninitialized pict_type!"); #if FF_API_CODED_FRAME FF_DISABLE_DEPRECATION_WARNINGS |