[vlc-devel] [PATCH] TS demux: get time and length

Laurent Aimar fenrir at elivagar.org
Sat Oct 8 20:18:50 CEST 2011


On Fri, Oct 07, 2011 at 02:09:57AM +0900, Naohiro KORIYAMA wrote:
> Hi Laurent,
> 
> Thank you for reviewing.
> 
> 2011/10/6 Laurent Aimar <fenrir at elivagar.org>:
> >  You could also store and use the exact position to:
> >  - improve the precision of the seek, and maybe (I am unsure) to avoid
> >  failling seeking in case the PCR was not too close of the byte position.
> 
> I add a variable which stores the position, and modify a variable
> which stores PCR from constant array to pointer.
> 
> 
> >  It would be simpler to initialize it with var_InheritBool("ts-seek-percent")
> > and it would avoid to call it at each seek.
> 
> > You could also set b_force_seek_per_percent to true here if
> > i_first_pcr/i_last_pcr are not valid (will simplify later code).
> 
> >  You don't need to check the value of f, it is guaranted to be valid.
> 
> >  Setting i_current_pcr here will avoid having GET_TIME failing
> > at the beginning.
> 
> I agree these things.

Patch merged by [cb5f74d6b3c9bbf35493ebc5d0b561bfaba9d7f1]
Thanks for your work :)

> >  I think that it might be worth to reject (ie b_force_seek_per_percent = true)
> > when they are too much PCR wraps. It will catch most of the file that have
> > arbitrary PCR reset.
> >  Again, that can be added later, as you prefer.
> 
> At this moment, I can't decide how many times to reject.
> But I add a test at GetLastPCR(). If the bitrate of the video is too
> low or too high, PCR  might have some problem.
 I think that more wrap than 1 (26 hours) or 2 (53 hours long file at
least) is already enougth to reject it. It might also be more robust
than checking the bitrate range.

-- 
fenrir




More information about the vlc-devel mailing list