Patch for the DirectX plugin

Gildas Bazin gbazin at
Tue Jun 12 07:37:33 CEST 2001

On Tuesday 12 June 2001 02:44, Stéphane Borel wrote:
> On Tue, Jun 12, 2001 at 12:57:30AM +0000, Jason Mancini wrote:
> > 
> > Does this result in "speeding" audio trying
> > to catch up?  The 0.2.80 client for Linux does
> > that, whereas 0.2.73 does not.  Maybe it's not
> > DirectX specific.
> Speeding audio at the beginning of the stream is due to the latency to
> launch the video output. It is a new problem since before, video output
> was not launched dynamically, but it is not specific to directx I think.
> On the other hand you should have speeding audio except at the
> beginning.

This is exactly the problem I've got: When you start to play a video, the 
sound starts with some delay and then tries to catch up with the video. Once 
the video has been playing for about a few seconds, the sound is perfectly 
For some reason this effect is made worse if in msleep we use only the win32 
Sleep function which has about (only) 15 miliseconds resolution. But when we 
use a combination of Sleep and a while loop which polls the current time, so 
that the msleep function has a better time resolution (but on the other hand 
sucks to much processor time); then this delay is usually reduced to less 
than half a second and even some times you don't have any delay.

This problem has been bothering me for some time now, and I haven't found a 
way to fix this.

If it's a problem with the latency to launch the video output, I suppose it 
could be solved by making sure that the video output and audio output are 
ready before outputting anything (mutex or semaphore).

Would it be easy to do ?


More information about the vlc-devel mailing list