summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-15 22:54:42 +0200
committerwm4 <wm4@nowhere>2014-04-15 22:54:52 +0200
commit824e4982bd18d1812c08bef6ba74cf2ad6601317 (patch)
tree6ee7276d17897930dbb46d22642de91742a8ecee
parent5aeec9aa70f47a88aeb20057169d54c54e87d017 (diff)
downloadmpv-824e4982bd18d1812c08bef6ba74cf2ad6601317.tar.bz2
mpv-824e4982bd18d1812c08bef6ba74cf2ad6601317.tar.xz
player: remove audio waiting
The audio subsystem now wakes up the playback thread explicitly, and we don't need this anymore. It still could cause dropouts and such if there are bugs in the recently introduced audio changes, so this is a thing to watch out for.
-rw-r--r--player/playloop.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/player/playloop.c b/player/playloop.c
index 707dc6de5c..84da8d231a 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -1250,24 +1250,8 @@ void run_playloop(struct MPContext *mpctx)
}
if (!mpctx->stop_play) {
- double audio_sleep = 9;
if (mpctx->restart_playback)
sleeptime = 0;
- if (mpctx->d_audio && !mpctx->paused) {
- if (ao_untimed(mpctx->ao)) {
- if (!video_left)
- audio_sleep = 0;
- } else if (full_audio_buffers) {
- audio_sleep = buffered_audio - 0.050;
- // Keep extra safety margin if the buffers are large
- if (audio_sleep > 0.100)
- audio_sleep = MPMAX(audio_sleep - 0.200, 0.100);
- else
- audio_sleep = MPMAX(audio_sleep, 0.020);
- } else
- audio_sleep = 0.020;
- }
- sleeptime = MPMIN(sleeptime, audio_sleep);
if (sleeptime > 0) {
if (handle_osd_redraw(mpctx))
sleeptime = 0;