* the ac3 frames detection doesn't work nice with big frames (1792) and buffer size of 2048

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32598 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2009-08-22 12:24:19 +00:00
parent f0bdc7699c
commit d44c1412ce
@@ -571,9 +571,13 @@ static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)
}
if(codec_id != expected_codec_id) return 0;
if (first_frames>=3) return AVPROBE_SCORE_MAX * 3 / 4;
#ifdef __HAIKU__
/* for typical buffer size 2048, we can't detect more than 1 full frame sized of 1792 */
else if(max_frames>=1) return AVPROBE_SCORE_MAX / 2;
#else
else if(max_frames>=3) return AVPROBE_SCORE_MAX / 2;
else if(max_frames>=1) return 1;
#endif
else if(max_frames>=1) return 1;
else return 0;
}
#endif