summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-01-16 09:41:26 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-01-16 09:41:26 +0000
commit9dee994c239562cd0dc89aad73a977b033324969 (patch)
treea3063b49180edc3a8745b5489f168c6398f9d9d5 /mplayer.c
parent398389873420bb225e7085a8dc3b1354dfbcb655 (diff)
downloadmpv-9dee994c239562cd0dc89aad73a977b033324969.tar.bz2
mpv-9dee994c239562cd0dc89aad73a977b033324969.tar.xz
100l, mixed up ao_data.samplerate and ao_data.bps when calculating sleep time.
Fixes stuttering audio when playing audio-only files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28329 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index e46143b763..e78dcbb33e 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -2027,7 +2027,7 @@ static int fill_audio_out_buffers(void)
// handle audio-only case:
// this is where mplayer sleeps during audio-only playback
// to avoid 100% CPU use
- sleep_time = (ao_data.outburst - bytes_to_write) * 1000 / ao_data.samplerate;
+ sleep_time = (ao_data.outburst - bytes_to_write) * 1000 / ao_data.bps;
if (sleep_time < 10) sleep_time = 10; // limit to 100 wakeups per second
usec_sleep(sleep_time * 1000);
}