# HG changeset patch # User cehoyos # Date 1234917367 0 # Node ID 328b7d545d0b7b87beed60cde4001e141a058c88 # Parent a5dce344904a9ae757f005339c866b504caf55b3 Parse dpb_output_delay in SEI picture structure. Patch by Ivan Schreter, schreter gmx net diff -r a5dce344904a -r 328b7d545d0b h264.c --- a/h264.c Wed Feb 18 00:33:33 2009 +0000 +++ b/h264.c Wed Feb 18 00:36:07 2009 +0000 @@ -2209,6 +2209,7 @@ h->outputed_poc = INT_MIN; h->prev_poc_msb= 1<<16; h->sei_recovery_frame_cnt = -1; + h->sei_dpb_output_delay = 0; return 0; } @@ -3144,6 +3145,7 @@ h->s.current_picture_ptr->reference= 0; h->s.first_field= 0; h->sei_recovery_frame_cnt = -1; + h->sei_dpb_output_delay = 0; ff_mpeg_flush(avctx); } @@ -6782,7 +6784,7 @@ MpegEncContext * const s = &h->s; if(h->sps.nal_hrd_parameters_present_flag || h->sps.vcl_hrd_parameters_present_flag){ skip_bits(&s->gb, h->sps.cpb_removal_delay_length); /* cpb_removal_delay */ - skip_bits(&s->gb, h->sps.dpb_output_delay_length); /* dpb_output_delay */ + h->sei_dpb_output_delay = get_bits(&s->gb, h->sps.dpb_output_delay_length); } if(h->sps.pic_struct_present_flag){ unsigned int i, num_clock_ts; @@ -7691,6 +7693,7 @@ MPV_frame_end(s); h->sei_recovery_frame_cnt = -1; + h->sei_dpb_output_delay = 0; if (cur->field_poc[0]==INT_MAX || cur->field_poc[1]==INT_MAX) { /* Wait for second field. */ diff -r a5dce344904a -r 328b7d545d0b h264.h --- a/h264.h Wed Feb 18 00:33:33 2009 +0000 +++ b/h264.h Wed Feb 18 00:36:07 2009 +0000 @@ -502,6 +502,11 @@ SEI_PicStructType sei_pic_struct; /** + * dpb_output_delay in picture timing SEI message, see H.264 C.2.2 + */ + int sei_dpb_output_delay; + + /** * recovery_frame_cnt from SEI message * * Set to -1 if no recovery point SEI message found or to number of frames