From 55328d5f7246d0f0e3892e253ac28600d1db75df Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 21 Dec 2013 14:09:45 +0100 Subject: [PATCH] avformat/electronicarts: detect endianness by comparing sizes instead of using an arbitrary threshold Signed-off-by: Michael Niedermayer --- libavformat/electronicarts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index d01883f3c3..4ba0fa0b61 100644 --- a/libavformat/electronicarts.c +++ b/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);