mirror of
https://github.com/mpv-player/mpv
synced 2025-01-02 13:02:24 +00:00
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".
This commit is contained in:
parent
0b52ac8a78
commit
f2bba55e01
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user