Package: faac / 1.29.9.2-2

0004-fixed-endianness-coversion-functions.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From a9f67bf89328abbbe7d8f6026f826d812e1165f4 Mon Sep 17 00:00:00 2001
From: Krzysztof Nikiel <knik@users.sourceforge.net>
Date: Sun, 17 Dec 2017 12:53:39 +0100
Subject: [PATCH 4/7] fixed endianness coversion functions

---
 frontend/mp4write.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/frontend/mp4write.c b/frontend/mp4write.c
index 962cbe5..dcc8228 100644
--- a/frontend/mp4write.c
+++ b/frontend/mp4write.c
@@ -47,19 +47,23 @@ mp4config_t mp4config = { 0 };
 
 static FILE *g_fout = NULL;
 
-static inline uint32_t bswap32(uint32_t u32)
+static inline uint32_t be32(uint32_t u32)
 {
 #ifndef WORDS_BIGENDIAN
     //return __bswap_32(u32);
     return __builtin_bswap32(u32);
+#else
+    return u32;
 #endif
 }
 
-static inline uint16_t bswap16(uint16_t u16)
+static inline uint16_t be16(uint16_t u16)
 {
 #ifndef WORDS_BIGENDIAN
     //return __bswap_16(u16);
     return __builtin_bswap16(u16);
+#else
+    return u16;
 #endif
 }
 
@@ -80,13 +84,13 @@ static int stringout(const char *txt)
 
 static int u32out(uint32_t u32)
 {
-    u32 = bswap32(u32);
+    u32 = be32(u32);
     return dataout(&u32, 4);
 }
 
 static int u16out(uint16_t u16)
 {
-    u16 = bswap16(u16);
+    u16 = be16(u16);
     return dataout(&u16, 2);
 }
 
-- 
2.18.0