summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-07-29 00:09:44 +0200
committerwm4 <wm4@nowhere>2015-07-29 00:09:44 +0200
commitf2bba55e015f572993fa6d2f9c19fa9c623888b9 (patch)
tree73dd0a6aacc448693915af1cbb78581a9b56ec0a
parent0b52ac8a78245793daaf533f5f8b74cb019a8aa8 (diff)
downloadmpv-f2bba55e015f572993fa6d2f9c19fa9c623888b9.tar.bz2
mpv-f2bba55e015f572993fa6d2f9c19fa9c623888b9.tar.xz
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".
-rw-r--r--player/command.c6
1 files changed, 5 insertions, 1 deletions
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)