mirror of
https://github.com/mpv-player/mpv
synced 2025-03-30 07:18:17 +00:00
player: fix crash on early audio uninit
Could crash when exiting playback in very early stages of initialization. CC: @mpv-player/stable
This commit is contained in:
parent
5a6a5695bb
commit
0e0dc5c5be
@ -593,8 +593,8 @@ void fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
|
||||
// Drop data queued for output, or which the AO is currently outputting.
|
||||
void clear_audio_output_buffers(struct MPContext *mpctx)
|
||||
{
|
||||
if (mpctx->ao) {
|
||||
if (mpctx->ao)
|
||||
ao_reset(mpctx->ao);
|
||||
if (mpctx->ao_buffer)
|
||||
mp_audio_buffer_clear(mpctx->ao_buffer);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user