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.
This commit is contained in:
wm4 2013-08-21 18:24:56 +02:00
parent 92658864ae
commit c8a7140c73
3 changed files with 3 additions and 3 deletions

View File

@ -1870,7 +1870,7 @@
Play files in random order. Play files in random order.
``--sid=<ID|auto|no>`` ``--sid=<ID|auto|no>``
Display the subtitle stream specified by ``<ID>`` (0-31). ``auto`` selects Display the subtitle stream specified by ``<ID>``. ``auto`` selects
the default, ``no`` disables subtitles. the default, ``no`` disables subtitles.
See also ``--slang``, ``--no-sub``. See also ``--slang``, ``--no-sub``.

View File

@ -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) OPT_GENERAL(struct m_geometry, __VA_ARGS__, .type = &m_option_type_size_box)
#define OPT_TRACKCHOICE(name, var) \ #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, ...) \ #define OPT_STRING_VALIDATE_(optname, varname, flags, validate_fn, ...) \
OPT_GENERAL(char*, optname, varname, flags, __VA_ARGS__, \ OPT_GENERAL(char*, optname, varname, flags, __VA_ARGS__, \

View File

@ -929,7 +929,7 @@ static bool demux_was_interrupted(struct MPContext *mpctx)
static int find_new_tid(struct MPContext *mpctx, enum stream_type t) 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++) { for (int i = 0; i < mpctx->num_tracks; i++) {
struct track *track = mpctx->tracks[i]; struct track *track = mpctx->tracks[i];
if (track->type == t) if (track->type == t)