summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-22 21:00:24 +0200
committerwm4 <wm4@nowhere>2015-05-22 21:00:24 +0200
commitae46833836453b7fc64f2cff9cb69d6cfd73f947 (patch)
treeb7ecb83b01279fc427348025f158d9fa14d7bd25 /player/command.c
parenta7c831f36d17fae13ef441a8f56281557cccd401 (diff)
downloadmpv-ae46833836453b7fc64f2cff9cb69d6cfd73f947.tar.bz2
mpv-ae46833836453b7fc64f2cff9cb69d6cfd73f947.tar.xz
player: use an array for stream ID options and such
This makes the code slightly more generic.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/player/command.c b/player/command.c
index 36cbf6cded..e203dd93ab 100644
--- a/player/command.c
+++ b/player/command.c
@@ -4623,12 +4623,10 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
autoload_external_files(mpctx);
if (cmd->args[0].v.i) {
// somewhat fuzzy and not ideal
- struct track *a = select_track(mpctx, STREAM_AUDIO, opts->audio_id,
- opts->audio_id_ff, opts->audio_lang);
+ struct track *a = select_default_track(mpctx, 0, STREAM_AUDIO);
if (a && a->is_external)
mp_switch_track(mpctx, STREAM_AUDIO, a);
- struct track *s = select_track(mpctx, STREAM_SUB, opts->sub_id,
- opts->sub_id_ff, opts->sub_lang);
+ struct track *s = select_default_track(mpctx, 0, STREAM_SUB);
if (s && s->is_external)
mp_switch_track(mpctx, STREAM_SUB, s);