summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index 89f893cc25..05f4646d0a 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -174,19 +174,8 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask)
mpctx->initialized_flags &= ~INITIALIZED_AO;
if (ao) {
// Note: with gapless_audio, stop_play is not correctly set
- if (opts->gapless_audio || mpctx->stop_play == AT_END_OF_FILE) {
- struct mp_audio data;
- mp_audio_buffer_peek(mpctx->ao_buffer, &data);
- int samples = mpctx->ao_buffer_playable_samples;
- assert(samples <= data.samples);
- if (samples > 0) {
- int played = ao_play(ao, data.planes, samples,
- AOPLAY_FINAL_CHUNK);
- if (played < samples)
- MP_WARN(mpctx, "Audio output truncated at end.\n");
- }
+ if (opts->gapless_audio || mpctx->stop_play == AT_END_OF_FILE)
ao_drain(ao);
- }
ao_uninit(ao);
}
mpctx->ao = NULL;