mirror of https://git.ffmpeg.org/ffmpeg.git
Merge remote-tracking branch 'qatar/master'
* qatar/master:
avconv: Match stream id
Conflicts:
cmdutils.c
doc/fftools-common-opts.texi
See: ea07063fd8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
bb6de15d92
|
@ -44,8 +44,8 @@ streams of this type.
|
|||
If @var{stream_index} is given, then it matches the stream with number @var{stream_index}
|
||||
in the program with the id @var{program_id}. Otherwise, it matches all streams in the
|
||||
program.
|
||||
@item #@var{stream_id}
|
||||
Matches the stream by a format-specific ID.
|
||||
@item #@var{stream_id} or i:@var{stream_id}
|
||||
Match the stream by stream id (e.g. PID in MPEG-TS container).
|
||||
@end table
|
||||
|
||||
@section Generic options
|
||||
|
|
|
@ -4468,12 +4468,14 @@ int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st,
|
|||
return 1;
|
||||
}
|
||||
return 0;
|
||||
} else if (*spec == '#') {
|
||||
int sid;
|
||||
} else if (*spec == '#' ||
|
||||
(*spec == 'i' && *(spec + 1) == ':')) {
|
||||
int stream_id;
|
||||
char *endptr;
|
||||
sid = strtol(spec + 1, &endptr, 0);
|
||||
spec += 1 + (*spec == 'i');
|
||||
stream_id = strtol(spec, &endptr, 0);
|
||||
if (!*endptr)
|
||||
return st->id == sid;
|
||||
return stream_id == st->id;
|
||||
} else if (!*spec) /* empty specifier, matches everything */
|
||||
return 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue