git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f638b67
)
h264: tighten the valid range for ref_frame_count
author
Anton Khirnov
<anton@khirnov.net>
Wed, 18 May 2016 08:04:44 +0000
(10:04 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Tue, 21 Jun 2016 09:14:07 +0000
(11:14 +0200)
This field (which the spec calls max_num_ref_frames) must be less than
or equal to MaxDpbFrames, which is at most 16.
libavcodec/h264_ps.c
patch
|
blob
|
history
diff --git
a/libavcodec/h264_ps.c
b/libavcodec/h264_ps.c
index
46457a8
..
4a56c73
100644
(file)
--- a/
libavcodec/h264_ps.c
+++ b/
libavcodec/h264_ps.c
@@
-431,8
+431,7
@@
int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
}
sps->ref_frame_count = get_ue_golomb_31(gb);
- if (sps->ref_frame_count > H264_MAX_PICTURE_COUNT - 2 ||
- sps->ref_frame_count >= 32U) {
+ 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;