mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avconv: Match stream id
Quite useful to select by pid in MPEG-TS.
This commit is contained in:
parent
6998a9f4c4
commit
81498ceb5b
@ -1530,6 +1530,12 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
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 */
|
} else if (!*spec) /* empty specifier, matches everything */
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
@ -42,6 +42,8 @@ streams of this type.
|
|||||||
@item p:@var{program_id}[:@var{stream_index}]
|
@item p:@var{program_id}[:@var{stream_index}]
|
||||||
If @var{stream_index} is given, then matches stream number @var{stream_index} in
|
If @var{stream_index} is given, then matches stream number @var{stream_index} in
|
||||||
program with id @var{program_id}. Otherwise matches all streams in this program.
|
program with id @var{program_id}. Otherwise matches all streams in this program.
|
||||||
|
@item i:@var{stream_id}
|
||||||
|
Match the stream by stream id (e.g. PID in MPEG-TS container).
|
||||||
@end table
|
@end table
|
||||||
@section Generic options
|
@section Generic options
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user