Commit 67cdfcf6 authored by Linjie Fu's avatar Linjie Fu Committed by Zhong Li

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: 's avatarLinjie Fu <linjie.fu@intel.com>
Signed-off-by: 's avatarZhong Li <zhong.li@intel.com>
parent ac0bcd6b
......@@ -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
......
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