1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-25 04:38:01 +00:00

player: don't remove all selected sub tracks in mp_dselect_track

fix secondary sub disappear after sub-reload, sub-remove.
This commit is contained in:
karelrooted 2023-11-13 20:43:01 +08:00 committed by Dudemanguy
parent 6f17a5efe3
commit 4420dfee2a

View File

@ -835,6 +835,8 @@ void mp_deselect_track(struct MPContext *mpctx, struct track *track)
{
if (track && track->selected) {
for (int t = 0; t < num_ptracks[track->type]; t++) {
if (mpctx->current_track[t][track->type] != track)
continue;
mp_switch_track_n(mpctx, t, track->type, NULL, 0);
mark_track_selection(mpctx, t, track->type, -1); // default
}