[vlc-devel] commit: Updated ASF to use VLC_TS_INVALID/0. (Laurent Aimar )

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


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Dec 20 16:43:50 2009 +0100| [643080c585755d2dfd700923b0565c36ceafebf2] | committer: Laurent Aimar 

Updated ASF to use VLC_TS_INVALID/0.

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

 modules/demux/asf/asf.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index 54a4515..05fb88a 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -594,10 +594,11 @@ static int DemuxPacket( demux_t *p_demux )
                 /* send complete packet to decoder */
                 block_t *p_gather = block_ChainGather( tk->p_frame );
 
-                tk->i_time = p_gather->i_dts;
+                if( p_gather->i_dts > VLC_TS_INVALID )
+                    tk->i_time = p_gather->i_dts - VLC_TS_0;
 
                 if( p_sys->i_time < 0 )
-                    es_out_Control( p_demux->out, ES_OUT_SET_PCR, tk->i_time+1 );
+                    es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + tk->i_time );
 
                 es_out_Send( p_demux->out, tk->p_es, p_gather );
 
@@ -617,13 +618,13 @@ static int DemuxPacket( demux_t *p_demux )
 
             if( tk->p_frame == NULL )
             {
-                p_frag->i_pts = i_pts + i_payload * (mtime_t)i_pts_delta;
+                p_frag->i_pts = VLC_TS_0 + i_pts + i_payload * (mtime_t)i_pts_delta;
                 if( tk->i_cat != VIDEO_ES )
-                    p_frag->i_dts = p_frag->i_pts;
+                    p_frag->i_dts = VLC_TS_0 + p_frag->i_pts;
                 else
                 {
-                    p_frag->i_dts = p_frag->i_pts;
-                    p_frag->i_pts = 0;
+                    p_frag->i_dts = VLC_TS_0 + p_frag->i_pts;
+                    p_frag->i_pts = VLC_TS_INVALID;
                 }
             }
 




More information about the vlc-devel mailing list