summaryrefslogtreecommitdiff
path: root/libavformat/raw.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/raw.c')
-rw-r--r--libavformat/raw.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c
index f807a96f31..e7cfd7c1d0 100644
--- a/libavformat/raw.c
+++ b/libavformat/raw.c
@@ -628,8 +628,11 @@ static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)
first_frames = frames;
}
if(codec_id != expected_codec_id) return 0;
- if (first_frames>=3) return AVPROBE_SCORE_MAX * 3 / 4;
- else if(max_frames>=3) return AVPROBE_SCORE_MAX / 2;
+ // keep this in sync with mp3 probe, both need to avoid
+ // issues with MPEG-files!
+ if (first_frames>=4) return AVPROBE_SCORE_MAX/2+1;
+ else if(max_frames>500)return AVPROBE_SCORE_MAX/2;
+ else if(max_frames>=4) return AVPROBE_SCORE_MAX/4;
else if(max_frames>=1) return 1;
else return 0;
}