diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2014-03-12 21:01:48 +0400 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2014-03-13 14:59:34 +0400 |
commit | 81498ceb5b2d1f72a3fd694849b1feaffc301e56 (patch) | |
tree | a82c257adaaf53dac38ada91d405d26fa9cbe270 /cmdutils.c | |
parent | 6998a9f4c4e069f515c50614179f4cfc7d0184f5 (diff) |
avconv: Match stream id
Quite useful to select by pid in MPEG-TS.
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c index a1e511632a..69a11bdd4f 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -1530,6 +1530,12 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec) return 1; } return 0; + } else if (*spec == 'i' && *(spec + 1) == ':') { + int stream_id; + char *endptr; + spec += 2; + stream_id = strtol(spec, &endptr, 0); + return stream_id == st->id; } else if (!*spec) /* empty specifier, matches everything */ return 1; |