summaryrefslogtreecommitdiff
path: root/libavcodec/h264_ps.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-08-01 13:02:20 -0300
committerJames Almer <jamrial@gmail.com>2016-08-01 13:02:20 -0300
commit9ee1f033656374a9f7c9bddcfd85739614580d62 (patch)
treeae6b3c2ac05ade8deebde1b8f9173baea5a97507 /libavcodec/h264_ps.c
parent8c7932884d09bc580036640453fd6b7ad4dd77b4 (diff)
parent70b1dcef2d859ae6b3e21d61de928c3dd0cf1aa4 (diff)
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>
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r--libavcodec/h264_ps.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index f288ca2a4f..4a5f66e184 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -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;