p_block = *pp_block;
- if( !p_block->i_pts && !p_block->i_dts && !date_Get( &p_sys->pts ) )
+ if( p_block->i_pts <= VLC_TS_INVALID && p_block->i_dts <= VLC_TS_INVALID &&
+ !date_Get( &p_sys->pts ) )
{
/* We've just started the stream, wait for the first PTS. */
block_Release( p_block );
}
/* Date management: If there is a pts avaliable, use that. */
- if( p_block->i_pts )
+ if( p_block->i_pts > VLC_TS_INVALID )
{
date_Set( &p_sys->pts, p_block->i_pts );
}
- else if( p_block->i_dts )
+ else if( p_block->i_dts > VLC_TS_INVALID )
{
/* NB, davidf doesn't quite agree with this in general, it is ok
* for rawvideo since it is in order (ie pts=dts), however, it