aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_ps.c
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-10-02 16:06:38 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-02 21:29:58 +0200
commitbfd7238adbec83981ddd259e26e9e8f90d78f472 (patch)
tree1dc324b68895d33a98b4b0fe488f8cf8b835199f /libavcodec/h264_ps.c
parentcf0052931d5776eafacd7771bc9c40da86e31b09 (diff)
downloadffmpeg-bfd7238adbec83981ddd259e26e9e8f90d78f472.tar.gz
h264: fix the check for invalid SPS:num_ref_frames.
This patch set the limit to 16. For information, thoses previous commits: 41f7e2d11d2dca23842ee89d530ca9fa15cec9d8 5cbb0e70a0a2ee99eb3cb09e837b9a1f7355b9bc assumed it was either 30 or 32. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit bcf881a6858760ecbd9ff4352a38813dc4232dd6)
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r--libavcodec/h264_ps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 61fb12ce0c..4bb02e0948 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -365,7 +365,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
}
sps->ref_frame_count= get_ue_golomb_31(&s->gb);
- if(sps->ref_frame_count > MAX_PICTURE_COUNT-2 || sps->ref_frame_count >= 32U){
+ if(sps->ref_frame_count > MAX_PICTURE_COUNT-2 || sps->ref_frame_count > 16U){
av_log(h->s.avctx, AV_LOG_ERROR, "too many reference frames\n");
goto fail;
}