lavf/vividas: Support demuxing on big-endian hardware.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Sun, 23 Dec 2018 00:34:55 +0000 (01:34 +0100)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Thu, 27 Dec 2018 23:20:47 +0000 (00:20 +0100)
libavformat/vividas.c

index 00a1a0f..598b8bb 100644 (file)
@@ -130,7 +130,7 @@ static void xor_block(void *p1, void *p2, unsigned size, int key, unsigned *key_
     size >>= 2;
 
     while (size > 0) {
-        *d2 = *d1 ^ k;
+        *d2 = *d1 ^ (HAVE_BIGENDIAN ? av_bswap32(k) : k);
         k += key;
         d1++;
         d2++;