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:
parent
ac0bcd6b61
commit
67cdfcf694
@ -1337,6 +1337,8 @@ int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q,
|
|||||||
pict_type = AV_PICTURE_TYPE_P;
|
pict_type = AV_PICTURE_TYPE_P;
|
||||||
else if (bs->FrameType & MFX_FRAMETYPE_B || bs->FrameType & MFX_FRAMETYPE_xB)
|
else if (bs->FrameType & MFX_FRAMETYPE_B || bs->FrameType & MFX_FRAMETYPE_xB)
|
||||||
pict_type = AV_PICTURE_TYPE_B;
|
pict_type = AV_PICTURE_TYPE_B;
|
||||||
|
else
|
||||||
|
av_assert0(!"Uninitialized pict_type!");
|
||||||
|
|
||||||
#if FF_API_CODED_FRAME
|
#if FF_API_CODED_FRAME
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
|
Loading…
Reference in New Issue
Block a user