Browse Source

h264: fix the check for invalid SPS:num_ref_frames.

This patch set the limit to 16.

For information, thoses previous commits:
41f7e2d11d
5cbb0e70a0
assumed it was either 30 or 32.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9
Laurent Aimar Michael Niedermayer 14 years ago
parent
commit
bcf881a685
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/h264_ps.c

+ 1
- 1
libavcodec/h264_ps.c View File

@@ -368,7 +368,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;
}


Loading…
Cancel
Save