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

Janne Kujanpää jikuja at iki.fi
Mon Sep 19 15:18:00 CEST 2011

Naohiro KORIYAMA <nkoriyama <at> gmail.com> writes:

> Hi,
> From last change, I  reflected your check points and added a new function.
> Seek(p_demux, f_percent) for seeking a time position not a byte position.

your patch unfortunately have problems when PCR wrap around to zero. This
happens once per 25,5 hours so when replaying DVB recordings there is always
good probability to have PCR wrapped around in those file(s). Also no position
no time and no legth are calculated with those files.

Example files: in http://users.utu.fi/jikuja/tmp/vlc/ (vdr-ts-PCR-wrap-long.ts 

Next problem: How does it work when part is cut out from ts file? Example file:
vdr-ts-PCR-cut-out.ts File has first 20s ts, cut out 40s and then 30s. After cut
current time jump till 1:00. With this time is calculated but length and
position aren't. Is seeking based time now? If so how does it behave with this
kind of files?

Regression bugs: with your patch when playing ts files position is always zero.
Breaks git:

Not to mention that ts playback is jerky when PCR is wrapped around or make
jumps even with vanilla git. Going to recheck this from trac and post new bug
report for playback problem.

Janne Kujanpää

More information about the vlc-devel mailing list