summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-04 10:57:07 +0100
committerwm4 <wm4@nowhere>2015-11-04 10:57:29 +0100
commit350d902799cef5858844fa8661b90c37ca743c40 (patch)
treeef46f2ec21da3f2fade665c4560c875dac259550 /player
parente187de7eedde0a38a0c7fa2b1c77bef6681de866 (diff)
downloadmpv-350d902799cef5858844fa8661b90c37ca743c40.tar.bz2
mpv-350d902799cef5858844fa8661b90c37ca743c40.tar.xz
player: fix display-sync adrop speed limiting
Commit 49d94853 worked only at the start of playback.
Diffstat (limited to 'player')
-rw-r--r--player/audio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/audio.c b/player/audio.c
index 12f9d03cb4..067bbece7d 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -689,7 +689,8 @@ void fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
assert(played >= 0 && played <= data.samples);
mp_audio_buffer_skip(mpctx->ao_buffer, played);
- mpctx->audio_drop_throttle -= played / play_samplerate;
+ mpctx->audio_drop_throttle =
+ MPMAX(0, mpctx->audio_drop_throttle - played / play_samplerate);
dump_audio_stats(mpctx);