From: Laurent Aimar Date: Sun, 20 Dec 2009 15:43:50 +0000 (+0100) Subject: Updated ASF to use VLC_TS_INVALID/0. X-Git-Tag: 1.1.0-ff~1870 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=643080c585755d2dfd700923b0565c36ceafebf2;p=vlc Updated ASF to use VLC_TS_INVALID/0. --- diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c index 54a451561d..05fb88a319 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; } }