From aeef177ff67b31d0f1e2ab27d90652bf4a229894 Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Mon, 12 Jun 2023 18:39:05 +0000 Subject: user/gst-plugins-good: update (backport from upstream) fix for broken test. --- user/gst-plugins-good/fix-arm-test-alignment.patch | 46 +++++++++++++++++----- 1 file changed, 36 insertions(+), 10 deletions(-) (limited to 'user/gst-plugins-good/fix-arm-test-alignment.patch') 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?= +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 + #include + ++#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 + -- cgit v1.2.3-70-g09d2