summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-23 17:41:50 +0100
committerwm4 <wm4@nowhere>2015-03-23 17:41:50 +0100
commit331b21f267d66c4a87a3af23e0baeed0fdd890d8 (patch)
treea067832c1c25ca0b964afe437e5831d860bb72a6
parent2a2391d3d86891721b3344341d1627a07f60e934 (diff)
downloadmpv-331b21f267d66c4a87a3af23e0baeed0fdd890d8.tar.bz2
mpv-331b21f267d66c4a87a3af23e0baeed0fdd890d8.tar.xz
encode: make --audio-channels=auto work
Basically requested. Not that anyone cares.
-rw-r--r--player/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/player/main.c b/player/main.c
index b85813a2f7..b3fb14ef10 100644
--- a/player/main.c
+++ b/player/main.c
@@ -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