player/loadfile: check if forced track is also tagged as default first

If a forced sub track also happens to be tagged as default, we should
check that before deselecting in compare_track. Fixes #13944.
This commit is contained in:
Dudemanguy 2024-04-20 00:50:17 -05:00
parent e7b0d6b38b
commit b364e4a65c
1 changed files with 2 additions and 2 deletions

View File

@ -511,10 +511,10 @@ static bool compare_track(struct track *t1, struct track *t2, char **langs, bool
return l1 > l2;
if (forced)
return t1->forced_track;
if (sub && !t2->forced_select && t2->forced_track)
return !t1->forced_track;
if (t1->default_track != t2->default_track && !t2->forced_select)
return t1->default_track;
if (sub && !t2->forced_select && t2->forced_track)
return !t1->forced_track;
if (os_langs && l1 != l2)
return l1 > l2;
if (t1->attached_picture != t2->attached_picture)