p_sys->i_interpolated_pts =
p_sys->i_interpolated_dts =
- p_sys->i_last_ref_pts =
+ p_sys->i_last_ref_pts = VLC_TS_INVALID;
+
p_sys->i_last_time_ref =
p_sys->i_time_ref =
p_sys->i_last_time =
/* We've just started the stream, wait for the first PTS.
* We discard here so we can still get the sequence header. */
- if( p_sys->i_interpolated_pts <= 0 &&
- p_sys->i_interpolated_dts <= 0 )
+ if( p_sys->i_interpolated_pts <= VLC_TS_INVALID &&
+ p_sys->i_interpolated_dts <= VLC_TS_INVALID )
{
msg_Dbg( p_dec, "need a starting pts/dts" );
return VLC_EGENERIC;
p_sys->i_last_timeincr = i_time_increment;
/* Correct interpolated dts when we receive a new pts/dts */
- if( p_vop->i_pts > 0 )
+ if( p_vop->i_pts > VLC_TS_INVALID )
p_sys->i_interpolated_pts = p_vop->i_pts;
- if( p_vop->i_dts > 0 )
+ if( p_vop->i_dts > VLC_TS_INVALID )
p_sys->i_interpolated_dts = p_vop->i_dts;
if( (p_sys->i_flags & BLOCK_FLAG_TYPE_B) || !p_sys->b_frame )
p_sys->i_interpolated_dts = p_sys->i_interpolated_pts;
- if( p_vop->i_pts > 0 )
+ if( p_vop->i_pts > VLC_TS_INVALID )
p_sys->i_interpolated_dts = p_vop->i_pts;
- if( p_vop->i_dts > 0 )
+ if( p_vop->i_dts > VLC_TS_INVALID )
p_sys->i_interpolated_dts = p_vop->i_dts;
p_sys->i_interpolated_pts = p_sys->i_interpolated_dts;
}
else
{
- if( p_sys->i_last_ref_pts > 0 )
+ if( p_sys->i_last_ref_pts > VLC_TS_INVALID )
p_sys->i_interpolated_dts = p_sys->i_last_ref_pts;
p_sys->i_last_ref_pts = p_sys->i_interpolated_pts;