From f2bba55e015f572993fa6d2f9c19fa9c623888b9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 29 Jul 2015 00:09:44 +0200 Subject: command: let track properties return option value in idle mode In idle mode (no file playing), the track properties such as vid/sid/aid should return the option setting, instead of the value "no". --- player/command.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'player') diff --git a/player/command.c b/player/command.c index bc9031ebb3..c8b61e5758 100644 --- a/player/command.c +++ b/player/command.c @@ -1784,7 +1784,11 @@ static int property_switch_track(struct m_property *prop, int action, void *arg, switch (action) { case M_PROPERTY_GET: - *(int *) arg = track ? track->user_tid : -2; + if (mpctx->playback_initialized) { + *(int *)arg = track ? track->user_tid : -2; + } else { + *(int *)arg = mpctx->opts->stream_id[order][type]; + } return M_PROPERTY_OK; case M_PROPERTY_PRINT: if (!track) -- cgit v1.2.3