Mercurial > libavformat.hg
diff electronicarts.c @ 5215:6fc9f9d8aaa1 libavformat
Slightly improve probe for ea format by checking that it is possible to
guess whether the file is little- or big-endian.
| author | reimar |
|---|---|
| date | Thu, 17 Sep 2009 18:07:27 +0000 |
| parents | 4ba7fd2077bd |
| children | d7e1371e4b5d |
line wrap: on
line diff
--- a/electronicarts.c Thu Sep 17 05:31:02 2009 +0000 +++ b/electronicarts.c Thu Sep 17 18:07:27 2009 +0000 @@ -389,9 +389,13 @@ 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,
