mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit '70b1dcef2d859ae6b3e21d61de928c3dd0cf1aa4'
* commit '70b1dcef2d859ae6b3e21d61de928c3dd0cf1aa4': h264: tighten the valid range for ref_frame_count Conflicts: libavcodec/h264_ps.c Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
commit
9ee1f03365
|
@ -457,8 +457,7 @@ int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
|
|||
sps->ref_frame_count = get_ue_golomb_31(gb);
|
||||
if (avctx->codec_tag == MKTAG('S', 'M', 'V', '2'))
|
||||
sps->ref_frame_count = FFMAX(2, sps->ref_frame_count);
|
||||
if (sps->ref_frame_count > H264_MAX_PICTURE_COUNT - 2 ||
|
||||
sps->ref_frame_count > 16U) {
|
||||
if (sps->ref_frame_count > MAX_DELAYED_PIC_COUNT) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"too many reference frames %d\n", sps->ref_frame_count);
|
||||
goto fail;
|
||||
|
|
Loading…
Reference in New Issue