Commit b230b2e7 authored by jbr's avatar jbr

add read_probe function to raw ac3 demuxer

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7887 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 03386264
...@@ -406,6 +406,22 @@ static int h261_probe(AVProbeData *p) ...@@ -406,6 +406,22 @@ static int h261_probe(AVProbeData *p)
return 0; return 0;
} }
static int ac3_probe(AVProbeData *p)
{
int score=0;
if(p->buf_size < 6)
return 0;
if((p->buf[0] == 0x0B) && (p->buf[1] == 0x77) && // sync word
((p->buf[4] >> 6) != 3) && // fscod
((p->buf[5] >> 3) <= 16)) { // bsid
score = AVPROBE_SCORE_MAX / 2 + 10;
}
return score;
}
AVInputFormat shorten_demuxer = { AVInputFormat shorten_demuxer = {
"shn", "shn",
"raw shorten", "raw shorten",
...@@ -450,7 +466,7 @@ AVInputFormat ac3_demuxer = { ...@@ -450,7 +466,7 @@ AVInputFormat ac3_demuxer = {
"ac3", "ac3",
"raw ac3", "raw ac3",
0, 0,
NULL, ac3_probe,
ac3_read_header, ac3_read_header,
raw_read_partial_packet, raw_read_partial_packet,
raw_read_close, raw_read_close,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment