1
mirror of https://github.com/mpv-player/mpv synced 2024-11-07 01:47:00 +01:00

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
parent 1e6b4d31aa
commit be02ebfcba

View File

@ -227,15 +227,13 @@ 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);
mp_audio_set_channels(&afs->output, &opts->audio_output_channels);
}
// filter input format: same as codec's output format: