diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2007-08-05 00:32:19 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2007-08-05 00:32:19 +0000 |
commit | ecc8fc11ecd310cce26c42a5377d4736e5ce8125 (patch) | |
tree | e840e75bc78add48e373cf40b7ed44e4de2ad228 /libavformat | |
parent | 2bf4aa2e937737deb781706673f806d4388cf796 (diff) | |
download | ffmpeg-ecc8fc11ecd310cce26c42a5377d4736e5ce8125.tar.gz |
additional tweaks to AC3 probe function. give a higher score to a single frame
at the start of the stream. also read all available data in the probe buffer.
Originally committed as revision 9922 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/raw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c index c1ccb62167..ffd8a43757 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -419,7 +419,7 @@ static int ac3_probe(AVProbeData *p) max_frames = 0; buf = p->buf; - end = buf + FFMIN(5120, p->buf_size - 7); + end = buf + p->buf_size; for(; buf < end; buf++) { buf2 = buf; @@ -434,7 +434,7 @@ static int ac3_probe(AVProbeData *p) first_frames = frames; } if (first_frames>=3) return AVPROBE_SCORE_MAX * 3 / 4; - else if(max_frames>=2) return AVPROBE_SCORE_MAX / 2; + else if(max_frames>=2 || first_frames>=1) return AVPROBE_SCORE_MAX / 2; else if(max_frames>=1) return 1; else return 0; } |