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

Janne Kujanpää jikuja at iki.fi
Mon Sep 19 18:24:56 CEST 2011


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

> 
> What a bad timing...
> I sent a patch for PCR wrap around probelm about 2 hours ago.
> Can you check it?
Time, length and position are calculated. => fixed


> 
> I cannot access the file vdr-ts-PCR-cut-out.ts. access forbidden.
fixed

> But I think if the ts file is cut (cut TV commercial or so) and PCRs
> are not adjusted,
> duration time and position will show wrong value.
> Duration time and position is calculated the following method:
> Duration time: (last PCR - first PCR) / 90 / 1000
> Position: (current PCR - first PCR) / 90 / 1000
> 
> I only suppose that PCRs are continuous.
> 
I think there should be option to use old file size based methods because this
is actually decreasing accuracy of seeking if user have files which have
noncontinuous PCR

> > Regression bugs: with your patch when playing ts files position is always  
zero.
> The patch, I sent 2 hours ago,  may fix that issue.
> 
Fixed too

I think this is so big patch we should do full regression test with many ts
files for vanilla git before merging it to make sure anything already isn't
broken. Like testmpeg2.ts which is mentioned later.

Newest problem with newest patch: Seek doesn't work anymore with vdr files. When
i try to seek it pauses playback for a while blinks new time statusbar and
continues from old location. 
via cli:

> seek 50%
[0x85efba0] main decoder warning: early picture skipped
[0x8642540] main decoder warning: received buffer in the future
[0x8642540] main decoder warning: received buffer in the future
[0x85eecf0] ts demux warning: lost synchro
[0x85eecf0] ts demux warning: lost synchro
[0x85eecf0] ts demux warning: lost synchro
[0x8540130] main input error: INPUT_CONTROL_SET_POSITION(_OFFSET) 50.0% failed
[0x8653380] main audio output warning: PTS is out of range (-4612), 
dropping buffer
[0x8653380] main audio output warning: PTS is out of range (-28574), 
dropping buffer
[0xb6ef9cf8] main video output warning: picture is too late to be displayed
(missing 32 ms)
seek 2000
> [0x85efba0] main decoder warning: early picture skipped
[0x8642540] main decoder warning: received buffer in the future
[0x8642540] main decoder warning: received buffer in the future
[0x85eecf0] ts demux warning: lost synchro
[0x85eecf0] ts demux warning: lost synchro
[0x85eecf0] ts demux warning: lost synchro
[0x8540130] main input warning: INPUT_CONTROL_SET_TIME(_OFFSET) 2000000000 
failed or not possible
[0xb6ef9cf8] main video output warning: picture is too late to be displayed
(missing 35 ms)

This seems to be vdr's fault. Trying to debug this.

-- 
Janne Kujanpää




More information about the vlc-devel mailing list