audio: don't force any parameters if spdif is used

The existing code only ignored --audio-channels, but not --audio-rate or
--audio-format if spdif passthrough is used. Setting these makes no
sense.
This commit is contained in:
wm4 2015-01-20 14:33:08 +01:00 committed by Diogo Franco (Kovensky)
parent 7d523cd47a
commit 3711327430
1 changed files with 3 additions and 5 deletions

View File

@ -227,14 +227,12 @@ void reinit_audio_chain(struct MPContext *mpctx)
struct af_stream *afs = mpctx->d_audio->afilter;
afs->output = (struct mp_audio){0};
if (mpctx->ao) {
ao_get_format(mpctx->ao, &afs->output);
} else {
afs->output = (struct mp_audio){0};
} else if (!AF_FORMAT_IS_SPECIAL(in_format.format)) {
afs->output.rate = opts->force_srate;
mp_audio_set_format(&afs->output, opts->audio_output_format);
// automatic downmix
if (!AF_FORMAT_IS_SPECIAL(in_format.format))
mp_audio_set_channels(&afs->output, &opts->audio_output_channels);
}