community/vlc: fix test on s390x and x86

fix a bug in chroma copy test which affect big endian systems
https://mailman.videolan.org/pipermail/vlc-devel/2017-December/117062.html

Work around a bug that apparently only affects x86 and s390x.
https://trac.videolan.org/vlc/ticket/19321
This commit is contained in:
Natanael Copa 2017-12-21 21:04:24 +00:00
parent 105b55a090
commit 3e7dea2bd2
3 changed files with 51 additions and 1 deletions

View File

@ -5,7 +5,7 @@ pkgname=vlc
pkgver=3.0.0_rc2 pkgver=3.0.0_rc2
_pkgver=${pkgver/_/-} _pkgver=${pkgver/_/-}
_ver=${_pkgver%[a-z]} _ver=${_pkgver%[a-z]}
pkgrel=0 pkgrel=1
pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player" pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
triggers="vlc-libs.trigger=/usr/lib/vlc/plugins" triggers="vlc-libs.trigger=/usr/lib/vlc/plugins"
pkgusers="vlc" pkgusers="vlc"
@ -118,6 +118,8 @@ source="http://download.videolan.org/pub/videolan/testing/vlc-$_ver/vlc-$_ver.ta
0001-configure-test-for-getaddrinfo_a-and-libanl.patch 0001-configure-test-for-getaddrinfo_a-and-libanl.patch
omxil-rpi-codecs.patch omxil-rpi-codecs.patch
check-headless.patch check-headless.patch
fix-test-endian.patch
disable-sub-autodetect-fuzzy-1-test.patch
vlc-libs.trigger" vlc-libs.trigger"
builddir="$srcdir"/$pkgname-$_ver builddir="$srcdir"/$pkgname-$_ver
@ -333,4 +335,6 @@ sha512sums="20b28f73938fbb1c946d72c56b1b5a53a747a866057f0b0085749e21e6b6be86f24a
64a46f6f0256d499492742a7662453a8491b2676c9a09fd6f898ce57e6cdeb7f8932d739ede1fc938ed7be4f5f8a3295a3be71f49c412a50f9a5c2d388cad81b 0001-configure-test-for-getaddrinfo_a-and-libanl.patch 64a46f6f0256d499492742a7662453a8491b2676c9a09fd6f898ce57e6cdeb7f8932d739ede1fc938ed7be4f5f8a3295a3be71f49c412a50f9a5c2d388cad81b 0001-configure-test-for-getaddrinfo_a-and-libanl.patch
e13e398b7bfd977f6e099bcb6cf8dc5cd5bad6dea3eff715881826246dc4329468846084aff2576de2b7fd28d3f06e7c327a6e4511a28d22e5cd198a81146c89 omxil-rpi-codecs.patch e13e398b7bfd977f6e099bcb6cf8dc5cd5bad6dea3eff715881826246dc4329468846084aff2576de2b7fd28d3f06e7c327a6e4511a28d22e5cd198a81146c89 omxil-rpi-codecs.patch
22d80df599b8b65a5439cefbb7140af8e9530f326d54945da3769af65f37518b99ec2cc8647aafd2763324a0698280915afe043cc87e5720c4694881ed35bffa check-headless.patch 22d80df599b8b65a5439cefbb7140af8e9530f326d54945da3769af65f37518b99ec2cc8647aafd2763324a0698280915afe043cc87e5720c4694881ed35bffa check-headless.patch
cca077d33ed077fc6cebdd47ed7f47c86db4ebdf1521d951336a52435921dc38efb4c91f87125393dfd69b145fa276f65035a7f522776f393059641be4d68f20 fix-test-endian.patch
e214b407235cb3afb8bec93f20c9b42957b57e6fd3960679d3d4235e77762e03e64d03c01f00ef63d589e7c85aaad02ce6abbeeccd66b1867bc92451a5b5e9b0 disable-sub-autodetect-fuzzy-1-test.patch
b67b6e21e9d4027aef1006e6057f9ba8e65ce3895b08f7b911b1675cff9bc423f64ee2c187c584860e9e5d4635a30408a7781add9694d9bba753eac37f357406 vlc-libs.trigger" b67b6e21e9d4027aef1006e6057f9ba8e65ce3895b08f7b911b1675cff9bc423f64ee2c187c584860e9e5d4635a30408a7781add9694d9bba753eac37f357406 vlc-libs.trigger"

View File

@ -0,0 +1,20 @@
This test fails on x86 and s390x so disable it for now
reported upstream: https://trac.videolan.org/vlc/ticket/19321
diff --git a/test/libvlc/slaves.c b/test/libvlc/slaves.c
index 7b2c24fa43..7c47b3147b 100644
--- a/test/libvlc/slaves.c
+++ b/test/libvlc/slaves.c
@@ -194,10 +194,12 @@ main (void)
assert(p_expected_slaves[i].psz_uri != NULL);
}
+#if 0
printf("== Testing --sub-autodetect-fuzzy 1 (everything) ==\n");
test_media_has_slaves_from_parent(p_vlc, SLAVES_DIR "/test.mp4",
p_expected_slaves,
EXPECTED_SLAVES_COUNT);
+#endif
libvlc_release(p_vlc);
printf("== Testing --sub-autodetect-fuzzy 2 (full, left, and right match) ==\n");

View File

@ -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)