From c8a7140c739038d33e030aa0b668e101e5228491 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 21 Aug 2013 18:24:56 +0200 Subject: mplayer: start track IDs from 1 rather than 0 Completely pointless, but makes ChrisK happy for some reason. Track ID 0 is now rejected by the option parser itself. --- mpvcore/m_option.h | 2 +- mpvcore/mplayer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mpvcore') diff --git a/mpvcore/m_option.h b/mpvcore/m_option.h index 03daa87cd4..96219b317a 100644 --- a/mpvcore/m_option.h +++ b/mpvcore/m_option.h @@ -624,7 +624,7 @@ int m_option_required_params(const m_option_t *opt); OPT_GENERAL(struct m_geometry, __VA_ARGS__, .type = &m_option_type_size_box) #define OPT_TRACKCHOICE(name, var) \ - OPT_CHOICE_OR_INT(name, var, 0, 0, 8190, ({"no", -2}, {"auto", -1})) + OPT_CHOICE_OR_INT(name, var, 0, 1, 8190, ({"no", -2}, {"auto", -1})) #define OPT_STRING_VALIDATE_(optname, varname, flags, validate_fn, ...) \ OPT_GENERAL(char*, optname, varname, flags, __VA_ARGS__, \ diff --git a/mpvcore/mplayer.c b/mpvcore/mplayer.c index fe1d18740b..001798aa9b 100644 --- a/mpvcore/mplayer.c +++ b/mpvcore/mplayer.c @@ -929,7 +929,7 @@ static bool demux_was_interrupted(struct MPContext *mpctx) static int find_new_tid(struct MPContext *mpctx, enum stream_type t) { - int new_id = -1; + int new_id = 0; for (int i = 0; i < mpctx->num_tracks; i++) { struct track *track = mpctx->tracks[i]; if (track->type == t) -- cgit v1.2.3