[vlc-devel] Re: Patch for supporting ReplayTV generated MPEG-2 files

Philip Van Baren pdvb at yahoo.com
Mon Jun 7 04:19:00 CEST 2004


I've narrowed this 10-second skip problem down a bit.  It seems to only be a
problem when the mpga audio module is being used -- with .vob files using the
a52 module, the 10-second skips work properly.

I can work around the problem by changing src/input/input_clock.c as follows:

/* Maximum gap allowed between two CRs. */
-#define CR_MAX_GAP 2000000
+#define CR_MAX_GAP 700000

This sets the max clock gap allowed before it will assume something was lost,
and automatically resynchronize.  2000000 clocks was 22.2 seconds, so 10
seconds skips were assumed normal.  700000 clocks would be 7.8 seconds, so any
10-second skip will now trigger a clock resync.  This doesn't seem like the
correct fix, however.  The input module should be flagging the discontinuity at
the file seek point, and the clocks should resync automatically based on the
discontinuity flag.  

I do wonder why you would allow for up to 22 seconds between clocks.  I thought
the MPEG-2 spec said you needed a clock update at least every 0.7 seconds, so a
threshold of 7.8 would still give you a 10x margin?  Is there some special case
where clock updates could be as slow as once every 20 seconds?

I've figured out bugzilla now, so I'll file a bug report there.  I'd still like
to figure out how to fix the problem the correct way, though.



--- Philip Van Baren <pdvb at yahoo.com> wrote:
> I also have a question: With VLC-0.7.2 and MPEG-2 files, the 1-minute and
> 5-minute hotkey skip functions work fine, but I can't get the 10-second skips
> to work.  When I skip backward 10 seconds, something in the decoder or
> display
> modules says the packet are all old, and dumps 10 seconds worth until I'm
> right
> back where I started.  When I skip forward 10 seconds, the decoder and/or
> display modules see images from the future, and wait 10 seconds before
> displaying them.  As a result, it "skips" 10 seconds, but the display freezes
> for 10 seconds before playing the new material.  This is all from a disk
> file,
> so seeking is not a problem.




	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list