diff options
author | wm4 <wm4@nowhere> | 2020-04-15 17:10:01 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-04-15 17:10:01 +0200 |
commit | cc2ee06e576f59d95adc2e863ac8efcca89ad588 (patch) | |
tree | 9a3c7e58f6aa006ed4c368c7dea92ae7f902f25f /player/command.c | |
parent | 6c02555397ca599a7ec9ea781e492631ecf1c7f2 (diff) | |
download | mpv-cc2ee06e576f59d95adc2e863ac8efcca89ad588.tar.bz2 mpv-cc2ee06e576f59d95adc2e863ac8efcca89ad588.tar.xz |
player: remove duplicated track option setter code
Well whatever.
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/player/command.c b/player/command.c index c10c4374aa..a5105ffe92 100644 --- a/player/command.c +++ b/player/command.c @@ -1884,10 +1884,8 @@ static int property_switch_track(void *ctx, struct m_property *prop, } else { // Simply cycle between "no" and "auto". It's possible that this does // not always do what the user means, but keep the complexity low. - mpctx->opts->stream_id[order][type] = - mpctx->opts->stream_id[order][type] == -1 ? -2 : -1; - m_config_notify_change_opt_ptr(mpctx->mconfig, - &mpctx->opts->stream_id[order][type]); + mark_track_selection(mpctx, order, type, + mpctx->opts->stream_id[order][type] == -1 ? -2 : -1); } return M_PROPERTY_OK; } @@ -5094,9 +5092,7 @@ static void cmd_track_add(void *p) mp_switch_track(mpctx, t->type, t, FLAG_MARK_SELECTION); print_track_list(mpctx, "Track switched:"); } else { - mpctx->opts->stream_id[0][t->type] = t->user_tid; - m_config_notify_change_opt_ptr(mpctx->mconfig, - &mpctx->opts->stream_id[0][t->type]); + mark_track_selection(mpctx, 0, t->type, t->user_tid); } return; } @@ -5116,9 +5112,7 @@ static void cmd_track_add(void *p) if (mpctx->playback_initialized) { mp_switch_track(mpctx, t->type, t, FLAG_MARK_SELECTION); } else { - mpctx->opts->stream_id[0][t->type] = t->user_tid; - m_config_notify_change_opt_ptr(mpctx->mconfig, - &mpctx->opts->stream_id[0][t->type]); + mark_track_selection(mpctx, 0, t->type, t->user_tid); } } char *title = cmd->args[2].v.s; |