aboutsummaryrefslogtreecommitdiffhomepage
path: root/player
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2015-06-03 21:52:32 +0200
committerGravatar wm4 <wm4@nowhere>2015-06-03 21:52:32 +0200
commit04d5bf4f0b4a54ce3495eebe1297a57b82cca274 (patch)
treeaa0de3f9f073a9683affbac5556bdbec3b919984 /player
parente14df5c4f4e57a860222156b2f6124824b90c216 (diff)
player: print track list when switching tracks
Diffstat (limited to 'player')
-rw-r--r--player/command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index 5148510b1f..3f3311d772 100644
--- a/player/command.c
+++ b/player/command.c
@@ -1799,12 +1799,14 @@ static int property_switch_track(struct m_property *prop, int action, void *arg,
mp_switch_track_n(mpctx, order, type,
track_next(mpctx, order, type, sarg->inc >= 0 ? +1 : -1, track),
FLAG_MARK_SELECTION);
+ print_track_list(mpctx, "Track switched:");
return M_PROPERTY_OK;
}
case M_PROPERTY_SET:
if (mpctx->playback_initialized) {
track = mp_track_by_tid(mpctx, type, *(int *)arg);
mp_switch_track_n(mpctx, order, type, track, FLAG_MARK_SELECTION);
+ print_track_list(mpctx, "Track switched:");
} else {
mpctx->opts->stream_id[order][type] = *(int *)arg;
}
@@ -1839,6 +1841,7 @@ static int property_switch_track_ff(void *ctx, struct m_property *prop,
if (!track && id >= 0)
return M_PROPERTY_ERROR;
mp_switch_track_n(mpctx, 0, type, track, 0);
+ print_track_list(mpctx, "Track switched:");
} else {
mpctx->opts->stream_id_ff[type] = *(int *)arg;
}
@@ -1992,6 +1995,7 @@ static int mp_property_program(void *ctx, struct m_property *prop,
find_track_by_demuxer_id(mpctx, STREAM_AUDIO, prog.aid), 0);
mp_switch_track(mpctx, STREAM_SUB,
find_track_by_demuxer_id(mpctx, STREAM_VIDEO, prog.sid), 0);
+ print_track_list(mpctx, "Program switched:");
return M_PROPERTY_OK;
case M_PROPERTY_GET_TYPE:
*(struct m_option *)arg = (struct m_option){