mirror of
https://github.com/mpv-player/mpv
synced 2025-01-04 14:12:10 +00:00
audio: correctly initialize output buffer
Just like the previous commit, this takes care of fallout from commit 7ab228, which fixed a bug, but introduced some new ones. CC: @mpv-player/stable
This commit is contained in:
parent
eba8eeda78
commit
eaa1f16564
@ -126,6 +126,12 @@ void reinit_audio_chain(struct MPContext *mpctx)
|
||||
if (!audio_init_best_codec(mpctx->d_audio, opts->audio_decoders))
|
||||
goto init_error;
|
||||
reset_audio_state(mpctx);
|
||||
|
||||
if (mpctx->ao) {
|
||||
struct mp_audio fmt;
|
||||
ao_get_format(mpctx->ao, &fmt);
|
||||
mp_audio_buffer_reinit(mpctx->ao_buffer, &fmt);
|
||||
}
|
||||
}
|
||||
assert(mpctx->d_audio);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user