mirror of https://github.com/mpv-player/mpv
audio: don't try to drain non-existent AO
52aed495cb
("audio: drain ao on EOF") introduced logic to drain an AO
when EOF of the input has been reached.
When no AO however is present this leads to a NULL-dereference.
Fixes #10556
This commit is contained in:
parent
37aea112c1
commit
bf5c19e05b
|
@ -945,7 +945,8 @@ void fill_audio_out_buffers(struct MPContext *mpctx)
|
||||||
(opts->gapless_audio && !ao_untimed(ao_c->ao))))
|
(opts->gapless_audio && !ao_untimed(ao_c->ao))))
|
||||||
{
|
{
|
||||||
MP_VERBOSE(mpctx, "audio EOF reached\n");
|
MP_VERBOSE(mpctx, "audio EOF reached\n");
|
||||||
ao_drain(mpctx->ao);
|
if (mpctx->ao)
|
||||||
|
ao_drain(mpctx->ao);
|
||||||
mpctx->audio_status = STATUS_EOF;
|
mpctx->audio_status = STATUS_EOF;
|
||||||
mp_wakeup_core(mpctx);
|
mp_wakeup_core(mpctx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue