summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-10-05 16:45:04 +0200
committerwm4 <wm4@nowhere>2016-10-05 16:45:04 +0200
commitd7e587acc93a76950585480cdf0aaafd102dd8b2 (patch)
tree101b10fb0160839493283dd7969b45a179379632
parent6fb12a5fdaf95bf5ded286c8db18a30e392964e1 (diff)
downloadmpv-d7e587acc93a76950585480cdf0aaafd102dd8b2.tar.bz2
mpv-d7e587acc93a76950585480cdf0aaafd102dd8b2.tar.xz
options: handle --audio-device changes like the other options
Don't require special property code for handling updates, and simply use the UPDATE_AUDIO flag instead. Also make runtime changes to --audio-client-name take effect.
-rw-r--r--options/options.c4
-rw-r--r--player/command.c5
2 files changed, 3 insertions, 6 deletions
diff --git a/options/options.c b/options/options.c
index 7d1505300f..93a76e5d41 100644
--- a/options/options.c
+++ b/options/options.c
@@ -499,9 +499,9 @@ const m_option_t mp_opts[] = {
OPT_SETTINGSLIST("ao", audio_driver_list, 0, &ao_obj_list, ),
OPT_SETTINGSLIST("ao-defaults", ao_defs, 0, &ao_obj_list,
.deprecation_message = "deprecated, use global options"),
- OPT_STRING("audio-device", audio_device, 0),
+ OPT_STRING("audio-device", audio_device, UPDATE_AUDIO),
OPT_FLAG("audio-exclusive", audio_exclusive, UPDATE_AUDIO),
- OPT_STRING("audio-client-name", audio_client_name, 0),
+ OPT_STRING("audio-client-name", audio_client_name, UPDATE_AUDIO),
OPT_FLAG("audio-fallback-to-null", ao_null_fallback, 0),
OPT_FLAG("audio-stream-silence", audio_stream_silence, 0),
OPT_FLOATRANGE("audio-wait-open", audio_wait_open, 0, 0, 60),
diff --git a/player/command.c b/player/command.c
index 96f60d70a9..1fa4695a91 100644
--- a/player/command.c
+++ b/player/command.c
@@ -1908,10 +1908,7 @@ static int mp_property_audio_device(void *ctx, struct m_property *prop,
}
}
}
- int r = mp_property_generic_option(mpctx, prop, action, arg);
- if (action == M_PROPERTY_SET)
- reload_audio_output(mpctx);
- return r;
+ return mp_property_generic_option(mpctx, prop, action, arg);
}
static int mp_property_audio_devices(void *ctx, struct m_property *prop,