similar to what avformat does
I forgot to re-submit that one after the other commits went through.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
case DEMUX_GET_POSITION:
pf = (double*)va_arg( args, double * );
if ( p_sys->f_duration > 0.0 )
- *pf = (double)(p_sys->i_pts >= p_sys->i_start_pts ? p_sys->i_pts : p_sys->i_start_pts ) / (1000.0 * p_sys->f_duration);
+ *pf = (double)(p_sys->i_pcr >= p_sys->i_start_pts ? p_sys->i_pcr : p_sys->i_start_pts ) / (1000.0 * p_sys->f_duration);
return VLC_SUCCESS;
case DEMUX_SET_POSITION:
case DEMUX_GET_TIME:
pi64 = (int64_t*)va_arg( args, int64_t * );
- *pi64 = p_sys->i_pts;
+ *pi64 = p_sys->i_pcr;
return VLC_SUCCESS;
case DEMUX_GET_TITLE_INFO: