[MPlayer-cygwin] ao_dsound

Florian Dietrich flodt8 at yahoo.de
Tue Mar 8 19:35:12 CET 2005


Nope, that's not the problem. But imho min_free_space should be 4096
anyhow.

Ah, I just figued out what the problem is. We return a wrong value in
get_space. If write_offset = play_offset while calling get_space
(this happens sometimes when we just wrote data into the buffer so it
is 100% full) we return the whole buffer size for space, while we
should return 0. So mplayer thinks it is 100% empty instead of 100%
full.

We can't just return 0 if space = buffer_size though, because then
the buffer never gets filled (also returns 0 if buffer empty).

Here's an easy fix that works though:

-static int min_free_space = 0;
+static int min_free_space = 4096;

...

in get_space:

-return space;
+return space-min_free_space;

This way the buffer is never 100% filled and this can't happen. We
should probably replace the 4096 with a value that is a multiple of
wformat.Format.nBlockAlign during runtime though.

How about

+min_free_space = ao_data.outburst;

in line 486?

Florian


	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de




More information about the MPlayer-cygwin mailing list