diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-01-15 05:07:09 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-01-15 05:57:31 +0200 |
commit | 9bcd12fdf5c6f85e9bb391caa2713021624a957e (patch) | |
tree | 375eac533ead90a45e7121e5ab307861b4ef52c8 /mplayer.c | |
parent | d419ecd161634e79dab3ac57d57c4bccba2adcdc (diff) | |
parent | e0d66b140e1da7a793bff15003cadab79544b1dd (diff) | |
download | mpv-9bcd12fdf5c6f85e9bb391caa2713021624a957e.tar.bz2 mpv-9bcd12fdf5c6f85e9bb391caa2713021624a957e.tar.xz |
Merge svn changes up to r28310
The libdvdread4 and libdvdnav directories, which are externals in the
svn repository, are at least for now not included in any form. I added
configure checks to automatically disable internal libdvdread and
libdvdnav if the corresponding directories are not present; if they're
added manually then things work the same as in svn.
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1935,6 +1935,7 @@ static int fill_audio_out_buffers(struct MPContext *mpctx) current_module="play_audio"; while (1) { + int sleep_time; // all the current uses of ao_data.pts seem to be in aos that handle // sync completely wrong; there should be no need to use ao_data.pts // in get_space() @@ -1946,7 +1947,9 @@ static int fill_audio_out_buffers(struct MPContext *mpctx) // handle audio-only case: // this is where mplayer sleeps during audio-only playback // to avoid 100% CPU use - usec_sleep(10000); // Wait a tick before retry + sleep_time = (ao_data.outburst - bytes_to_write) * 1000 / ao_data.samplerate; + if (sleep_time < 10) sleep_time = 10; // limit to 100 wakeups per second + usec_sleep(sleep_time * 1000); } while (bytes_to_write) { |