diff options
author | wm4 <wm4@nowhere> | 2016-01-25 13:43:43 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-25 13:43:43 +0100 |
commit | 266d8368e82bbede6a087b6c83a1066fc5d91b9c (patch) | |
tree | 0cca5cae7ba986f5fbddecd430ece7a27767f410 /player | |
parent | 223588b36a701701047e273178e3c0d1718045b8 (diff) |
audio: fix spdif PCM fallback
With the format left untouched, this would just try to reinit with a
spdif format again.
We're not clearing the format in reset_audio_state() so the audio chain
can be recreated any time without having to wait for a frame to be
decoded.
Diffstat (limited to 'player')
-rw-r--r-- | player/audio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/player/audio.c b/player/audio.c index 932d38a14b..47acffb8b7 100644 --- a/player/audio.c +++ b/player/audio.c @@ -346,12 +346,14 @@ void reinit_audio_chain(struct MPContext *mpctx) if (!mpctx->ao) { // If spdif was used, try to fallback to PCM. if (spdif_fallback) { + MP_VERBOSE(mpctx, "Falling back to PCM output.\n"); ao_c->spdif_passthrough = false; ao_c->spdif_failed = true; ao_c->audio_src->try_spdif = false; if (!audio_init_best_codec(ao_c->audio_src)) goto init_error; reset_audio_state(mpctx); + ao_c->input_format = (struct mp_audio){0}; reinit_audio_chain(mpctx); return; } |