OSDN Git Service

fix big endian files support
authorAurelien Jacobs <aurel@gnuage.org>
Thu, 18 Oct 2007 23:22:50 +0000 (23:22 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Thu, 18 Oct 2007 23:22:50 +0000 (23:22 +0000)
Originally committed as revision 10801 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/electronicarts.c

index 1678d68..7aaff86 100644 (file)
@@ -290,7 +290,7 @@ static int ea_read_packet(AVFormatContext *s,
 
     while (!packet_read) {
         chunk_type = get_le32(pb);
-        chunk_size = get_le32(pb) - 8;
+        chunk_size = (ea->big_endian ? get_be32(pb) : get_le32(pb)) - 8;
 
         switch (chunk_type) {
         /* audio data */