summaryrefslogtreecommitdiffstats
path: root/player/misc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-04-15 17:03:37 +0200
committerwm4 <wm4@nowhere>2020-04-15 17:04:00 +0200
commit6c02555397ca599a7ec9ea781e492631ecf1c7f2 (patch)
treeaaeaf1c14e7cdcbbfcbdc331e5b31d0cf040b9ff /player/misc.c
parentdae0652e19c568f578642993ad96531f56c5d259 (diff)
downloadmpv-6c02555397ca599a7ec9ea781e492631ecf1c7f2.tar.bz2
mpv-6c02555397ca599a7ec9ea781e492631ecf1c7f2.tar.xz
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.
Diffstat (limited to 'player/misc.c')
-rw-r--r--player/misc.c6
1 files changed, 6 insertions, 0 deletions
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);