diff h264.c @ 2254:0dfe4e32b19c libavcodec

H.264 max reference pictures fix by (Loren Merritt <lorenm at u dot washington dot edu>)
author michael
date Sat, 25 Sep 2004 09:59:36 +0000
parents bf414a07af2e
children 507690ff49a2
line wrap: on
line diff
--- a/h264.c	Fri Sep 24 20:35:59 2004 +0000
+++ b/h264.c	Sat Sep 25 09:59:36 2004 +0000
@@ -5430,6 +5430,9 @@
     }
 
     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;