1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-21 15:27:00 +00:00

encoding: allow encoding to channel configurations other than stereo

A while ago, we made mpv output the native number of channels by
default, instead of stereo. I assumed this was not wanted for encode
mode.

This commit keeps the assumption, but allows setting the number of audio
output channels at all, instead of always forcing stereo. (Pretty much a
hack.)

(cherry picked from commit 636d6d724d)
This commit is contained in:
wm4 2015-02-23 16:25:12 +01:00 committed by Diogo Franco (Kovensky)
parent 589b38c187
commit 352c00fd08

View File

@ -408,7 +408,9 @@ int mp_initialize(struct MPContext *mpctx)
m_config_set_option0(mpctx->mconfig, "load-scripts", "no");
m_config_set_option0(mpctx->mconfig, "osc", "no");
m_config_set_option0(mpctx->mconfig, "framedrop", "no");
m_config_set_option0(mpctx->mconfig, "audio-channels", "stereo");
// never use auto
if (!opts->audio_output_channels.num)
m_config_set_option0(mpctx->mconfig, "audio-channels", "stereo");
mp_input_enable_section(mpctx->input, "encode", MP_INPUT_EXCLUSIVE);
}
#endif