]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Export timestamp parameter from H.264.
authorcehoyos <cehoyos@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 24 Feb 2009 22:24:34 +0000 (22:24 +0000)
committercehoyos <cehoyos@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 24 Feb 2009 22:24:34 +0000 (22:24 +0000)
Patch by Ivan Schreter, schreter gmx net

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17575 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/h264_parser.c

index a0120ac2a136e69047cf68ddc022f69900357c5e..934ca15cfe4ce5cd61e0dbd8b8b780307c141e09 100644 (file)
@@ -123,6 +123,9 @@ static inline int parse_nal_units(AVCodecParserContext *s,
 
     h->s.avctx= avctx;
     h->sei_recovery_frame_cnt = -1;
+    h->sei_dpb_output_delay         =  0;
+    h->sei_cpb_removal_delay        = -1;
+    h->sei_buffering_period_present =  0;
 
     for(;;) {
         int src_length, dst_length, consumed;
@@ -256,6 +259,10 @@ static int h264_parse(AVCodecParserContext *s,
         }
 
         parse_nal_units(s, avctx, buf, buf_size);
+
+        s->dts_sync_point    = h->sei_buffering_period_present;
+        s->dts_ref_dts_delta = h->sei_cpb_removal_delay;
+        s->pts_dts_delta     = h->sei_dpb_output_delay;
     }
 
     *poutbuf = buf;