[FFmpeg-cvslog] avformat/electronicarts: detect endianness by comparing sizes instead of using an arbitrary threshold

Michael Niedermayer git at videolan.org
Sat Dec 21 17:20:59 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Dec 21 14:09:45 2013 +0100| [55328d5f7246d0f0e3892e253ac28600d1db75df] | committer: Michael Niedermayer

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

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=55328d5f7246d0f0e3892e253ac28600d1db75df
---

 libavformat/electronicarts.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index d01883f..4ba0fa0 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);
 



More information about the ffmpeg-cvslog mailing list