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.)
This commit is contained in:
wm4 2013-12-25 11:29:38 +01:00
parent f751609450
commit f691d8f7b6
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}