From bb93e506d5d1bd69da3cdaead4e7b77971e814c9 Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 17 Sep 2009 18:07:27 +0000 Subject: [PATCH] Slightly improve probe for ea format by checking that it is possible to guess whether the file is little- or big-endian. git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19896 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- libavformat/electronicarts.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 9f82e623f2..13f6f21fd7 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -389,9 +389,13 @@ static int ea_probe(AVProbeData *p) case MPCh_TAG: case MVhd_TAG: case MVIh_TAG: - return AVPROBE_SCORE_MAX; + break; + default: + return 0; } - return 0; + if (AV_RL32(&p->buf[4]) > 0xfffff && AV_RB32(&p->buf[4]) > 0xfffff) + return 0; + return AVPROBE_SCORE_MAX; } static int ea_read_header(AVFormatContext *s, -- 2.11.4.GIT