[vlc-devel] commit: Fixed initial timestamp value in xa demuxer. (Laurent Aimar )

git version control git at videolan.org
Mon Dec 21 00:02:40 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Dec 20 22:11:17 2009 +0100| [a6a7af28ea33c88e2791bd043cd0ae05b7c4c470] | committer: Laurent Aimar 

Fixed initial timestamp value in xa demuxer.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a6a7af28ea33c88e2791bd043cd0ae05b7c4c470
---

 modules/demux/xa.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/demux/xa.c b/modules/demux/xa.c
index d1ffcc2..65b0c97 100644
--- a/modules/demux/xa.c
+++ b/modules/demux/xa.c
@@ -176,11 +176,12 @@ static int Demux( demux_t *p_demux )
     }
 
     i_frames = p_block->i_buffer / p_sys->fmt.audio.i_bytes_per_frame;
-    p_block->i_dts = p_block->i_pts =
-        date_Increment( &p_sys->pts,
-                        i_frames * p_sys->fmt.audio.i_frame_length );
+    p_block->i_dts = p_block->i_pts = VLC_TS_0 + date_Get( &p_sys->pts );
     es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
     es_out_Send( p_demux->out, p_sys->p_es, p_block );
+
+    date_Increment( &p_sys->pts, i_frames * p_sys->fmt.audio.i_frame_length );
+
     return 1;
 }
 




More information about the vlc-devel mailing list