summaryrefslogtreecommitdiff
path: root/user/gst-plugins-good/fix-arm-test-alignment.patch
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2023-06-12 18:39:05 +0000
committerZach van Rijn <me@zv.io>2023-06-12 18:39:05 +0000
commitaeef177ff67b31d0f1e2ab27d90652bf4a229894 (patch)
tree258c8c33a19911026451df7540abac72d79d6833 /user/gst-plugins-good/fix-arm-test-alignment.patch
parent87761f90bac72283c35725a215a48d8e7b1a101c (diff)
downloadpackages-aeef177ff67b31d0f1e2ab27d90652bf4a229894.tar.gz
packages-aeef177ff67b31d0f1e2ab27d90652bf4a229894.tar.bz2
packages-aeef177ff67b31d0f1e2ab27d90652bf4a229894.tar.xz
packages-aeef177ff67b31d0f1e2ab27d90652bf4a229894.zip
user/gst-plugins-good: update (backport from upstream) fix for broken test.
Diffstat (limited to 'user/gst-plugins-good/fix-arm-test-alignment.patch')
-rw-r--r--user/gst-plugins-good/fix-arm-test-alignment.patch46
1 files changed, 36 insertions, 10 deletions
diff --git a/user/gst-plugins-good/fix-arm-test-alignment.patch b/user/gst-plugins-good/fix-arm-test-alignment.patch
index 673ec7d83..2b2a6a0c0 100644
--- a/user/gst-plugins-good/fix-arm-test-alignment.patch
+++ b/user/gst-plugins-good/fix-arm-test-alignment.patch
@@ -1,16 +1,42 @@
-diff -ur a/tests/check/elements/rtpbin_buffer_list.c b/tests/check/elements/rtpbin_buffer_list.c
---- a/tests/check/elements/rtpbin_buffer_list.c 2023-06-12 16:31:48.734887801 +0000
-+++ b/tests/check/elements/rtpbin_buffer_list.c 2023-06-12 16:54:58.883822559 +0000
-@@ -236,10 +236,8 @@
+From 57ced2fded938aa08d8727683a1823ae36170fc3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
+Date: Mon, 12 Jun 2023 19:24:15 +0100
+Subject: [PATCH] tests: rtpbin_buffer_list: fix possible unaligned read on
+ 32-bit ARM
+
+Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/689
+---
+ .../tests/check/elements/rtpbin_buffer_list.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/subprojects/gst-plugins-good/tests/check/elements/rtpbin_buffer_list.c b/subprojects/gst-plugins-good/tests/check/elements/rtpbin_buffer_list.c
+index b804744352a..1c3d5cdd3a7 100644
+--- a/tests/check/elements/rtpbin_buffer_list.c
++++ b/tests/check/elements/rtpbin_buffer_list.c
+@@ -25,6 +25,12 @@
+ #include <gst/rtp/gstrtpbuffer.h>
+ #include <gst/rtp/gstrtcpbuffer.h>
+
++#if G_BYTE_ORDER == G_BIG_ENDIAN
++#define READ_UINT64(mem) GST_READ_UINT64_BE(mem)
++#else
++#define READ_UINT64(mem) GST_READ_UINT64_LE(mem)
++#endif
++
+ /* UDP/IP is assumed for bandwidth calculation */
+ #define UDP_IP_HEADER_OVERHEAD 28
+
+@@ -236,8 +242,8 @@ check_header (GstBuffer * buffer, guint index)
* most likely be changed in gstrtpbin.
*/
fail_unless (info.data != NULL);
- fail_unless_equals_uint64 (*(guint64 *) info.data,
- *(guint64 *) rtp_header[index]);
-- fail_unless (*(guint16 *) (info.data + 12) ==
-- *(guint16 *) (rtp_header[index] + 12));
-+ fail_unless (memcmp(info.data , rtp_header[index] , 8) == 0);
-+ fail_unless (memcmp(info.data + 12, rtp_header[index] + 12, info.size - 12) == 0);
++ fail_unless_equals_uint64 (READ_UINT64 (info.data),
++ READ_UINT64 (rtp_header[index]));
+ fail_unless (*(guint16 *) (info.data + 12) ==
+ *(guint16 *) (rtp_header[index] + 12));
- gst_memory_unmap (memory, &info);
- gst_memory_unref (memory);
+--
+GitLab
+