avformat/electronicarts: detect endianness by comparing sizes instead of using an arbitrary threshold

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/51/head
Michael Niedermayer 11 years ago
parent a07d4bc80a
commit 55328d5f72
  1. 2
      libavformat/electronicarts.c

@ -357,7 +357,7 @@ static int process_ea_header(AVFormatContext *s)
blockid = avio_rl32(pb);
size = avio_rl32(pb);
if (i == 0)
ea->big_endian = size > 0x000FFFFF;
ea->big_endian = size > av_bswap32(size);
if (ea->big_endian)
size = av_bswap32(size);

Loading…
Cancel
Save