]> git.sesse.net Git - vlc/commitdiff
Fixed initial timestamp value in xa demuxer.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 20 Dec 2009 21:11:17 +0000 (22:11 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 20 Dec 2009 22:23:30 +0000 (23:23 +0100)
modules/demux/xa.c

index d1ffcc2b7507812afc556f1875102564165b996e..65b0c97a3d2db78a98da1083eb2ff032f6280212 100644 (file)
@@ -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;
 }