diff mbox

[FFmpeg-devel] lavf/vividas: Support demuxing on big-endian hardware

Message ID CAB0OVGpc4H7B=R98vO+snFjtegicARHaeRNJLxiq+jcPnZUjhw@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos Dec. 23, 2018, 12:36 a.m. UTC
Hi!

Attached patch fixes demuxing vividas on big-endian hardware.

Please comment, Carl Eugen

Comments

Paul B Mahol Dec. 23, 2018, 8:52 a.m. UTC | #1
On 12/23/18, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
> Hi!
>
> Attached patch fixes demuxing vividas on big-endian hardware.
>
> Please comment, Carl Eugen
>

OK, if tested and works.
Carl Eugen Hoyos Dec. 27, 2018, 11:24 p.m. UTC | #2
2018-12-23 9:52 GMT+01:00, Paul B Mahol <onemda@gmail.com>:
> On 12/23/18, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>> Hi!
>>
>> Attached patch fixes demuxing vividas on big-endian hardware.
>>
>> Please comment, Carl Eugen
>>
>
> OK, if tested and works.

Patch applied.

Thank you, Carl Eugen
diff mbox

Patch

From 283fbd058772b40848eae48191d1d5faa5b543d5 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Sun, 23 Dec 2018 01:34:55 +0100
Subject: [PATCH] lavf/vividas: Support demuxing on big-endian hardware.

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

diff --git a/libavformat/vividas.c b/libavformat/vividas.c
index e199b05..9be48bb 100644
--- a/libavformat/vividas.c
+++ b/libavformat/vividas.c
@@ -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++;
-- 
1.7.10.4