From c6628a5fb618715910ac7cb6d247fc0c0650517b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 12 Aug 2017 23:43:05 +0200 Subject: player: add --track-auto-selection option I imagine this is useful. Or maybe it isn't. --- player/loadfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/loadfile.c') 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; -- cgit v1.2.3