From d44c1412cecf484f21d2dfd79f4717f0424b7aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sat, 22 Aug 2009 12:24:19 +0000 Subject: [PATCH] * 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 --- src/add-ons/media/plugins/ffmpeg/libavformat/raw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/add-ons/media/plugins/ffmpeg/libavformat/raw.c b/src/add-ons/media/plugins/ffmpeg/libavformat/raw.c index 5d0d59a62e..9c109eaac9 100644 --- a/src/add-ons/media/plugins/ffmpeg/libavformat/raw.c +++ b/src/add-ons/media/plugins/ffmpeg/libavformat/raw.c @@ -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