lavf/concatdec: allow probing.

This commit is contained in:
Nicolas George 2013-02-03 10:27:11 +01:00
parent db9dc5154d
commit b68dd8a161
2 changed files with 6 additions and 3 deletions

View File

@ -44,8 +44,6 @@ length.
All files must have the same streams (same codecs, same time base, etc.). All files must have the same streams (same codecs, same time base, etc.).
This script format can currently not be probed, it must be specified explicitly.
@subsection Syntax @subsection Syntax
The script is a text file in extended-ASCII, with one directive per line. The script is a text file in extended-ASCII, with one directive per line.
@ -62,6 +60,10 @@ backslash or single quotes.
Identify the script type and version. It also sets the @option{safe} option Identify the script type and version. It also sets the @option{safe} option
to 1 if it was to its default -1. to 1 if it was to its default -1.
To make FFmpeg recognize the format automatically, this directive must
appears exactly as is (no extra space or byte-order-mark) on the very first
line of the script.
@end table @end table
@subsection Options @subsection Options

View File

@ -40,7 +40,8 @@ typedef struct {
static int concat_probe(AVProbeData *probe) static int concat_probe(AVProbeData *probe)
{ {
return 0; return memcmp(probe->buf, "ffconcat version 1.0", 20) ?
0 : AVPROBE_SCORE_MAX;
} }
static char *get_keyword(uint8_t **cursor) static char *get_keyword(uint8_t **cursor)