encode: make --audio-channels=auto work

Basically requested. Not that anyone cares.
This commit is contained in:
wm4 2015-03-23 17:41:50 +01:00
parent 2a2391d3d8
commit 331b21f267
1 changed files with 4 additions and 2 deletions

View File

@ -444,8 +444,10 @@ int mp_initialize(struct MPContext *mpctx, char **options)
m_config_set_option0(mpctx->mconfig, "osc", "no");
m_config_set_option0(mpctx->mconfig, "framedrop", "no");
// never use auto
if (!opts->audio_output_channels.num)
m_config_set_option0(mpctx->mconfig, "audio-channels", "stereo");
if (!opts->audio_output_channels.num) {
m_config_set_option_ext(mpctx->mconfig, bstr0("audio-channels"),
bstr0("stereo"), M_SETOPT_PRESERVE_CMDLINE);
}
mp_input_enable_section(mpctx->input, "encode", MP_INPUT_EXCLUSIVE);
}
#endif