summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-10-28 23:50:59 +0100
committerwm4 <wm4@nowhere>2015-10-28 23:57:24 +0100
commitd1ad0815fe2406504ac5cc5a498ae5d8143c1d98 (patch)
tree11e7e1781d3bdc742e7b94a099d7048db83722b6
parentfc3f1e7c54074fbbcaa501cb06fd43a36b0e2f15 (diff)
downloadmpv-d1ad0815fe2406504ac5cc5a498ae5d8143c1d98.tar.bz2
mpv-d1ad0815fe2406504ac5cc5a498ae5d8143c1d98.tar.xz
player: simplify display-adrop mode safeguard
It's not needed, because the additional data is not appended, but is the total size of the audio buffer. The maximum size is the static audio drop size (or twice, if the audio is duplicated).
-rw-r--r--player/audio.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/player/audio.c b/player/audio.c
index 9207986892..5e19f118d0 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -562,14 +562,7 @@ void fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
skip_duplicate = mpctx->last_av_difference >= 0 ? -samples : samples;
- // safeguard against excessively growing audio buffer sizes
- if (skip_duplicate < 0 && mp_audio_buffer_seconds(mpctx->ao_buffer) > 5) {
- skip_duplicate = 0;
- samples = 0;
- }
-
- if (playsize < samples)
- playsize = samples;
+ playsize = MPMAX(playsize, samples);
}
int status = AD_OK;