summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-04-13 15:55:51 +0200
committerwm4 <wm4@nowhere>2020-04-13 15:56:52 +0200
commitf6c81047fa5a9199084fa92327c41c6d8a16b059 (patch)
tree0df3a581b4f1d3e23a88e44ab53cae1e087c9bbb /player
parente1e714ccc339c24b43179aa36f7f5f61865e2e98 (diff)
downloadmpv-f6c81047fa5a9199084fa92327c41c6d8a16b059.tar.bz2
mpv-f6c81047fa5a9199084fa92327c41c6d8a16b059.tar.xz
player: do not fall back to a default track with explicit selections
Consider e.g. --aid=2 with a file that has only 1 track. Then it would fall back to selecting track 1. Stop doing this. If no matching track is found, this will not select any track now. Note that the fingerprint stuff (track_layout_hash in the source) prevents softens the impact of this change. Without the fingerprint, playing a dual-audio file with the second track selected, and then a single-audio file, would play the second file without audio. But the fingerprint resets it due to differences in the track list. Try to exhaustively document this and tricky interactions between the other features. What a damn mess, I think it's simply cursed. Of course it's still my fault. See: #7608
Diffstat (limited to 'player')
-rw-r--r--player/loadfile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index 8e40992a04..d09addeb89 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -522,6 +522,8 @@ struct track *select_default_track(struct MPContext *mpctx, int order,
continue;
if (track->user_tid == tid)
return track;
+ if (tid >= 0)
+ continue;
if (track->no_auto_select)
continue;
if (duplicate_track(mpctx, order, type, track))