summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-03-07 15:24:32 +0100
committerwm4 <wm4@nowhere>2014-03-09 00:19:31 +0100
commit41f2b26d11e81095a0d8d370480e0d2459208070 (patch)
tree1b665e392be25795b8fade6d0487609f73ac90d2 /player/loadfile.c
parent74b7001500c0901b095986fafe7dca3e5c23c7f2 (diff)
downloadmpv-41f2b26d11e81095a0d8d370480e0d2459208070.tar.bz2
mpv-41f2b26d11e81095a0d8d370480e0d2459208070.tar.xz
audio/out: make ao struct opaque
We want to move the AO to its own thread. There's no technical reason for making the ao struct opaque to do this. But it helps us sleep at night, because we can control access to shared state better.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index 7cfaf67978..657c950f32 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -178,14 +178,14 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask)
if (opts->gapless_audio || mpctx->stop_play == AT_END_OF_FILE) {
drain = true;
struct mp_audio data;
- mp_audio_buffer_peek(ao->buffer, &data);
- int samples = ao->buffer_playable_samples;
+ 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(ao, "Audio output truncated at end.\n");
+ MP_WARN(mpctx, "Audio output truncated at end.\n");
}
}
ao_uninit(ao, drain);