mov: Fix little endian audio detection
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 13 Mar 2015 19:45:14 +0000 (19:45 +0000)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Tue, 19 May 2015 11:05:23 +0000 (12:05 +0100)
Set this field to TRUE if the audio component is to operate on
little-endian data, and FALSE otherwise.

However TRUE and FALSE are not defined. Since this flag is just a boolean,
interpret all values except for 0 as little endian.

Sample-Id: 64bit_FLOAT_Little_Endian.mov

libavformat/mov.c

index d14dc7c..60d171d 100644 (file)
@@ -864,7 +864,7 @@ static int mov_read_enda(MOVContext *c, AVIOContext *pb, MOVAtom atom)
         return 0;
     st = c->fc->streams[c->fc->nb_streams-1];
 
-    little_endian = avio_rb16(pb);
+    little_endian = !!avio_rb16(pb);
     av_dlog(c->fc, "enda %d\n", little_endian);
     if (little_endian == 1) {
         switch (st->codec->codec_id) {