1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Linjie Fu 2018-11-28 10:41:55 +08:00 committed by Zhong Li
parent ac0bcd6b61
commit 67cdfcf694

View File

@ -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