aboutsummaryrefslogtreecommitdiffstats
path: root/community/vlc/fix-test-endian.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/vlc/fix-test-endian.patch')
-rw-r--r--community/vlc/fix-test-endian.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/community/vlc/fix-test-endian.patch b/community/vlc/fix-test-endian.patch
new file mode 100644
index 0000000000..3b08e068ac
--- /dev/null
+++ b/community/vlc/fix-test-endian.patch
@@ -0,0 +1,26 @@
+diff --git a/modules/video_chroma/copy.c b/modules/video_chroma/copy.c
+index 67e147637b..d9b029274c 100644
+--- a/modules/video_chroma/copy.c
++++ b/modules/video_chroma/copy.c
+@@ -34,6 +34,7 @@
+ #include <vlc_picture.h>
+ #include <vlc_cpu.h>
+ #include <assert.h>
++#include <arpa/inet.h>
+
+ #include "copy.h"
+
+@@ -983,10 +984,10 @@ static void piccheck(picture_t *pic, const vlc_chroma_description_t *dsc,
+
+ assert(pic->i_planes == 2 || pic->i_planes == 3);
+ const uint8_t colors_8_P[3] = { 0x42, 0xF1, 0x36 };
+- const uint16_t color_8_UV = 0x36F1;
++ const uint16_t color_8_UV = ntohs(0xF136);
+
+- const uint16_t colors_16_P[3] = { 0x4210, 0x14F1, 0x4536 };
+- const uint32_t color_16_UV = 0x453614F1;
++ const uint16_t colors_16_P[3] = { ntohs(0x1042), ntohs(0xF114), ntohs(0x3645) };
++ const uint32_t color_16_UV = ntohl(0xF1143645);
+
+ assert(dsc->pixel_size == 1 || dsc->pixel_size == 2);
+ if (dsc->pixel_size == 1)