From 6c02555397ca599a7ec9ea781e492631ecf1c7f2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 15 Apr 2020 17:03:37 +0200 Subject: player: slightly improve use of secondary track selection limits Apparently, this was a bit of a mess, which caused the bug fixed by commit ec7f2388af2df. Try to improve this, and only use track selection entries that exist. --- player/misc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'player/misc.c') diff --git a/player/misc.c b/player/misc.c index 4246c1c6f9..e8cebbc2e6 100644 --- a/player/misc.c +++ b/player/misc.c @@ -45,6 +45,12 @@ #include "core.h" #include "command.h" +const int num_ptracks[STREAM_TYPE_COUNT] = { + [STREAM_VIDEO] = 1, + [STREAM_AUDIO] = 1, + [STREAM_SUB] = 2, +}; + double rel_time_to_abs(struct MPContext *mpctx, struct m_rel_time t) { double length = get_time_length(mpctx); -- cgit v1.2.3