summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-12 23:43:05 +0200
committerwm4 <wm4@nowhere>2017-08-12 23:44:47 +0200
commitc6628a5fb618715910ac7cb6d247fc0c0650517b (patch)
tree20d682817da226df703fb75ab5430692bcd60c71 /player
parentb531332835c4c5ef0cf18e04ce28034ac643168d (diff)
downloadmpv-c6628a5fb618715910ac7cb6d247fc0c0650517b.tar.bz2
mpv-c6628a5fb618715910ac7cb6d247fc0c0650517b.tar.xz
player: add --track-auto-selection option
I imagine this is useful. Or maybe it isn't.
Diffstat (limited to 'player')
-rw-r--r--player/loadfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index f0bb582b4f..311280d915 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -1269,7 +1269,7 @@ reopen_file:
struct track *sel = NULL;
bool taken = (t == STREAM_VIDEO && mpctx->vo_chain) ||
(t == STREAM_AUDIO && mpctx->ao_chain);
- if (!taken)
+ if (!taken && opts->stream_auto_sel)
sel = select_default_track(mpctx, i, t);
mpctx->current_track[i][t] = sel;
}
@@ -1311,7 +1311,7 @@ reopen_file:
reinit_audio_chain(mpctx);
reinit_sub_all(mpctx);
- if (!mpctx->vo_chain && !mpctx->ao_chain) {
+ if (!mpctx->vo_chain && !mpctx->ao_chain && opts->stream_auto_sel) {
MP_FATAL(mpctx, "No video or audio streams selected.\n");
mpctx->error_playing = MPV_ERROR_NOTHING_TO_PLAY;
goto terminate_playback;