[MPlayer-dev-eng] [PATCH] ao_null and audio-only
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri Nov 5 08:44:22 CET 2004
Hi,
this patch should fix the insane (>90%) CPU usage when playing e.g. MP3 with
-ao null.
Also, it seems correct to me as the aos should round the len parameter
of the play function to a number divisible by outburst, so 0 and anything < outburst are effectively the same...
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.806
diff -u -r1.806 mplayer.c
--- mplayer.c 3 Nov 2004 21:37:09 -0000 1.806
+++ mplayer.c 5 Nov 2004 10:28:47 -0000
@@ -2189,7 +2189,8 @@
playsize=audio_out->get_space();
// handle audio-only case:
- if(!playsize && !sh_video) { // buffer is full, do not block here!!!
+ if(playsize < ao_data.outburst &&
+ !sh_video) { // buffer is full, do not block here!!!
usec_sleep(10000); // Wait a tick before retry
continue;
}
More information about the MPlayer-dev-eng
mailing list