summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/options.rst18
-rw-r--r--player/loadfile.c2
2 files changed, 20 insertions, 0 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 347a6bbcc4..bd00d16fb4 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -76,6 +76,24 @@ Track Selection
before mpv 0.33.0, the user's track selection parameters are clobbered
in certain situations.
+ Also since mpv 0.33.0, trying to select a track by number will strictly
+ select this track. Before this change, trying to select a track which
+ did not exist would fall back to track default selection at playback
+ initialization. The new behavior is more consistent.
+
+ Setting a track selection property at runtime, and then playing a new
+ file might reset the track selection to defaults, if the fingerprint
+ of the track list of the new file is different.
+
+ Be aware of tricky combinations of all of all of the above: for example,
+ ``mpv --aid=2 file_with_2_audio_tracks.mkv file_with_1_audio_track.mkv``
+ would first play the correct track, and the second file without audio.
+ If you then go back the first file, its first audio track will be played,
+ and the second file is played with audio. If you do the same thing again
+ but instead of using ``--aid=2`` you run ``set aid 2`` while the file is
+ playing, then changing to the second file will play its audio track.
+ This is because runtime selection enables the fingerprint heuristic.
+
Most likely this is not the end.
``--sid=<ID|auto|no>``
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))