Parse initial_cpb_removal_delay_length.
authorIvan Schreter <schreter@gmx.net>
Wed, 18 Feb 2009 00:33:33 +0000 (00:33 +0000)
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>
Wed, 18 Feb 2009 00:33:33 +0000 (00:33 +0000)
Patch by Ivan Schreter, schreter gmx net

Originally committed as revision 17411 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h264.c
libavcodec/h264.h

index cb27476ea42b73018f552dd8603d78ded7c1dd13..ca65c3401d1bc06348dc1fa08c0b78eea568bfeb 100644 (file)
@@ -6917,7 +6917,7 @@ static inline int decode_hrd_parameters(H264Context *h, SPS *sps){
         get_ue_golomb(&s->gb); /* cpb_size_value_minus1 */
         get_bits1(&s->gb);     /* cbr_flag */
     }
-    get_bits(&s->gb, 5); /* initial_cpb_removal_delay_length_minus1 */
+    sps->initial_cpb_removal_delay_length = get_bits(&s->gb, 5) + 1;
     sps->cpb_removal_delay_length = get_bits(&s->gb, 5) + 1;
     sps->dpb_output_delay_length = get_bits(&s->gb, 5) + 1;
     sps->time_offset_length = get_bits(&s->gb, 5);
index cd960531c54c1a16039a61f230a5303c62a09578..43c9a9389948dfb47c2e5a792eabe72c41fdd675 100644 (file)
@@ -179,6 +179,7 @@ typedef struct SPS{
     int vcl_hrd_parameters_present_flag;
     int pic_struct_present_flag;
     int time_offset_length;
+    int initial_cpb_removal_delay_length; ///< initial_cpb_removal_delay_length_minus1 +1
     int cpb_removal_delay_length;      ///< cpb_removal_delay_length_minus1 + 1
     int dpb_output_delay_length;       ///< dpb_output_delay_length_minus1 + 1
     int bit_depth_luma;                ///< bit_depth_luma_minus8 + 8