diff options
author | wm4 <wm4@nowhere> | 2013-12-23 20:14:54 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-24 17:44:34 +0100 |
commit | b796f2bb7693676056d0de98a9a95258909d799b (patch) | |
tree | a7c23c5a39b7cb817c911b68854e6304bfe7ea19 /player/command.c | |
parent | 96e6f3f4b6a7379fac6b61c741c57ccfc062f915 (diff) | |
download | mpv-b796f2bb7693676056d0de98a9a95258909d799b.tar.bz2 mpv-b796f2bb7693676056d0de98a9a95258909d799b.tar.xz |
player: redo demuxer stream selection
Use struct track to decide what stream to select.
Add a "selected" field and use that in some places instead of
checking mpctx->current_track.
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/player/command.c b/player/command.c index a7ded72836..a3da05a5c7 100644 --- a/player/command.c +++ b/player/command.c @@ -1067,10 +1067,9 @@ static int property_list_tracks(m_option_t *prop, int action, void *arg, if (track->type != type) continue; - bool selected = mpctx->current_track[track->type] == track; res = talloc_asprintf_append(res, "%s: ", track_type_name(track->type)); - if (selected) + if (track->selected) res = talloc_asprintf_append(res, "> "); res = talloc_asprintf_append(res, "(%d) ", track->user_tid); if (track->title) @@ -1079,7 +1078,7 @@ static int property_list_tracks(m_option_t *prop, int action, void *arg, res = talloc_asprintf_append(res, "(%s) ", track->lang); if (track->is_external) res = talloc_asprintf_append(res, "(external) "); - if (selected) + if (track->selected) res = talloc_asprintf_append(res, "<"); res = talloc_asprintf_append(res, "\n"); } |