summaryrefslogtreecommitdiff
path: root/cmdutils.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-03-12 18:01:48 +0100
committerLuca Barbato <lu_zero@gentoo.org>2014-03-13 11:59:34 +0100
commit81498ceb5b2d1f72a3fd694849b1feaffc301e56 (patch)
treea82c257adaaf53dac38ada91d405d26fa9cbe270 /cmdutils.c
parent6998a9f4c4e069f515c50614179f4cfc7d0184f5 (diff)
avconv: Match stream id
Quite useful to select by pid in MPEG-TS.
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c6
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;