diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-08-10 16:06:18 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-08-10 16:06:18 +0000 |
commit | e020dbd2a13617b0c4343c66e84f425f04976b56 (patch) | |
tree | dd74ec4f4547c911c3f46f292353eaeccd5aa248 /libavformat/raw.c | |
parent | 9c3e2f78a04200e604add6139ba6f64078fa2274 (diff) | |
download | ffmpeg-e020dbd2a13617b0c4343c66e84f425f04976b56.tar.gz |
flac probe
closes issue83
Originally committed as revision 10059 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/raw.c')
-rw-r--r-- | libavformat/raw.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c index e03fad5e1e..fc8bfaf540 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -434,6 +434,12 @@ static int ac3_probe(AVProbeData *p) else return 0; } +static int flac_probe(AVProbeData *p) +{ + if(memcmp(p->buf, "fLaC", 4)) return 0; + else AVPROBE_SCORE_MAX / 2; +} + AVInputFormat shorten_demuxer = { "shn", "raw shorten", @@ -450,7 +456,7 @@ AVInputFormat flac_demuxer = { "flac", "raw flac", 0, - NULL, + flac_probe, flac_read_header, raw_read_partial_packet, raw_read_close, |