diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-09-25 09:59:36 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-09-25 09:59:36 +0000 |
commit | 5cbb0e70a0a2ee99eb3cb09e837b9a1f7355b9bc (patch) | |
tree | 794b95854b0aa8258d931fcde3ea660c0fc60f11 /libavcodec/h264.c | |
parent | 15c5fa7b7f63c81e6c7cd987ab10d9bc8b1fb557 (diff) | |
download | ffmpeg-5cbb0e70a0a2ee99eb3cb09e837b9a1f7355b9bc.tar.gz |
H.264 max reference pictures fix by (Loren Merritt <lorenm at u dot washington dot edu>)
Originally committed as revision 3504 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index cb026badc4..d90fefc7df 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -5430,6 +5430,9 @@ static inline int decode_seq_parameter_set(H264Context *h){ } sps->ref_frame_count= get_ue_golomb(&s->gb); + if(sps->ref_frame_count > MAX_PICTURE_COUNT-2){ + av_log(h->s.avctx, AV_LOG_ERROR, "too many reference frames\n"); + } sps->gaps_in_frame_num_allowed_flag= get_bits1(&s->gb); sps->mb_width= get_ue_golomb(&s->gb) + 1; sps->mb_height= get_ue_golomb(&s->gb) + 1; |