mirror of https://github.com/mpv-player/mpv
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:
parent
7d523cd47a
commit
3711327430
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue