summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-25 11:29:38 +0100
committerwm4 <wm4@nowhere>2013-12-25 11:32:33 +0100
commitf691d8f7b65f93c08fb93505a05187cc232273b0 (patch)
tree0f5138a0e2a431515e4f0c0124b1f3b10882a1b7
parentf7516094500c543349fde0498c41bfcc72f21d2c (diff)
downloadmpv-f691d8f7b65f93c08fb93505a05187cc232273b0.tar.bz2
mpv-f691d8f7b65f93c08fb93505a05187cc232273b0.tar.xz
player: deselect secondary sub when switching to file with different tracks
This applies the usual logic of resetting stream selections to default when switching to a file with a different track layout. (This is to prevent selecting random streams.)
-rw-r--r--player/loadfile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index 251112975f..64db70687b 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -591,6 +591,8 @@ static void check_previous_track_selection(struct MPContext *mpctx)
mpctx->opts->audio_id = -1;
if (opts->sub_id >= 0)
mpctx->opts->sub_id = -1;
+ if (opts->sub2_id >= 0)
+ mpctx->opts->sub2_id = -2;
talloc_free(mpctx->track_layout_hash);
mpctx->track_layout_hash = NULL;
}