[vlc-devel] [PATCH] MKV: use the more accurate i_pcr for GET_TIME and GET_POSITION

Steve Lhomme robux4 at videolabs.io
Fri Mar 13 10:31:42 CET 2015


On Thu, Mar 12, 2015 at 6:26 PM, Francois Cartegnie <fcvlcdev at free.fr> wrote:
> Le 12/03/2015 15:42, Steve Lhomme a écrit :
>>              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);
>
> You'll have a dancing position within the first PCR interval.

I think we can live with that. the GET_POSITION is not meant to be
absolutely precise.

> Start PCR < Start PTS -> uses PCR (total duration includes 1st PCR->1st
> pts range)

I don't understand. It will always use i_start_pts until there's a
value that indicate we passed the "preroll" data. And i_pcr can never
be bigger than i_pts or i_dts.

> then at some point, for subsequent calls
> PCR always > Start PTS -> uses PTS (total duration excludes 1st PCR->1st
> pts range)
>
> Francois
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list