diff options
author | wm4 <wm4@nowhere> | 2013-05-12 21:47:55 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-12 21:47:55 +0200 |
commit | e6e5a7b221ef2fcdd5a1982d6fdcb627100447d2 (patch) | |
tree | 08b54ef9bb771434fc7fbe9185793503d3ba314c /core/command.c | |
parent | 6a83ef1552de4a1a71da49e45647ce1a4ce64e53 (diff) | |
parent | 48f94311516dc1426644b3e68b2a48c22727e1e7 (diff) | |
download | mpv-e6e5a7b221ef2fcdd5a1982d6fdcb627100447d2.tar.bz2 mpv-e6e5a7b221ef2fcdd5a1982d6fdcb627100447d2.tar.xz |
Merge branch 'audio_changes'
Conflicts:
audio/out/ao_lavc.c
Diffstat (limited to 'core/command.c')
-rw-r--r-- | core/command.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/core/command.c b/core/command.c index d9788084db..d8a8882c26 100644 --- a/core/command.c +++ b/core/command.c @@ -684,20 +684,10 @@ static int mp_property_channels(m_option_t *prop, int action, void *arg, return M_PROPERTY_UNAVAILABLE; switch (action) { case M_PROPERTY_PRINT: - switch (mpctx->sh_audio->channels) { - case 1: - *(char **) arg = talloc_strdup(NULL, "mono"); - break; - case 2: - *(char **) arg = talloc_strdup(NULL, "stereo"); - break; - default: - *(char **) arg = talloc_asprintf(NULL, "%d channels", - mpctx->sh_audio->channels); - } + *(char **) arg = mp_chmap_to_str(&mpctx->sh_audio->channels); return M_PROPERTY_OK; case M_PROPERTY_GET: - *(int *)arg = mpctx->sh_audio->channels; + *(int *)arg = mpctx->sh_audio->channels.num; return M_PROPERTY_OK; } return M_PROPERTY_NOT_IMPLEMENTED; @@ -2319,7 +2309,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) break; } af->control(af, AF_CONTROL_COMMAND_LINE, cmd->args[1].v.s); - af_reinit(sh_audio->afilter, af); + af_reinit(sh_audio->afilter); } break; case MP_CMD_SHOW_CHAPTERS: |