changeset 9039:d4002371b3d2 libavcodec

Export timestamp parameter from H.264. Patch by Ivan Schreter, schreter gmx net
author cehoyos
date Tue, 24 Feb 2009 22:24:34 +0000
parents d4c12f2d226b
children 71620eeff338
files h264_parser.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/h264_parser.c	Tue Feb 24 22:19:09 2009 +0000
+++ b/h264_parser.c	Tue Feb 24 22:24:34 2009 +0000
@@ -123,6 +123,9 @@
 
     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 @@
         }
 
         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;