diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-09-17 18:07:27 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-09-17 18:07:27 +0000 |
commit | 892d7e78ef12404db31adf440c30df73bb4890e5 (patch) | |
tree | d1bda661f608076bf6e2b169f455bd071d3b6141 /libavformat | |
parent | a5083f66c7d084406e0311a9958867cf8aefe766 (diff) | |
download | ffmpeg-892d7e78ef12404db31adf440c30df73bb4890e5.tar.gz |
Slightly improve probe for ea format by checking that it is possible to
guess whether the file is little- or big-endian.
Originally committed as revision 19896 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/electronicarts.c | 8 |
1 files 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, |