avconv: Match stream id
Quite useful to select by pid in MPEG-TS.
This commit is contained in:
parent
6998a9f4c4
commit
81498ceb5b
2 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue