]> git.sesse.net Git - vlc/commitdiff
Updated ASF to use VLC_TS_INVALID/0.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 20 Dec 2009 15:43:50 +0000 (16:43 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 20 Dec 2009 22:23:27 +0000 (23:23 +0100)
modules/demux/asf/asf.c

index 54a451561dd808434482be1fa78e486135bc3bb9..05fb88a319956ec7b651d7276775de93945744b6 100644 (file)
@@ -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;
                 }
             }