diff options
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c index 2f17de2cf8..4f0055513d 100644 --- a/player/command.c +++ b/player/command.c @@ -2076,6 +2076,16 @@ static int property_current_tracks(void *ctx, struct m_property *prop, return M_PROPERTY_UNKNOWN; struct track *t = mpctx->current_track[order][type]; + + if (!t && mpctx->lavfi) { + for (int n = 0; n < mpctx->num_tracks; n++) { + if (mpctx->tracks[n]->type == type && mpctx->tracks[n]->selected) { + t = mpctx->tracks[n]; + break; + } + } + } + if (!t) return M_PROPERTY_UNAVAILABLE; |