mirror of https://github.com/mpv-player/mpv
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
0ba2da8a76
commit
3c7d49c38f
|
@ -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