summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2018-07-30 09:09:36 +0300
committerMart Raudsepp <leio@gentoo.org>2018-07-30 09:09:55 +0300
commit98cf3f1b82c3d75d75c11458d1d8fb25aa148ae3 (patch)
tree1dfc1dc02850d57eb26d699428c146bf6baf90f6 /media-libs/gst-plugins-good
parentdev-lang/tk: Version 8.6.8. (diff)
downloadgentoo-98cf3f1b82c3d75d75c11458d1d8fb25aa148ae3.tar.gz
gentoo-98cf3f1b82c3d75d75c11458d1d8fb25aa148ae3.tar.bz2
gentoo-98cf3f1b82c3d75d75c11458d1d8fb25aa148ae3.zip
media-libs/gst-plugins-good: fix potential 32bit test failures
Closes: https://bugs.gentoo.org/661528 Package-Manager: Portage-2.3.43, Repoman-2.3.10
Diffstat (limited to 'media-libs/gst-plugins-good')
-rw-r--r--media-libs/gst-plugins-good/files/1.14.1-fix-32bit-rtpstorage-test.patch112
-rw-r--r--media-libs/gst-plugins-good/gst-plugins-good-1.14.1.ebuild2
2 files changed, 114 insertions, 0 deletions
diff --git a/media-libs/gst-plugins-good/files/1.14.1-fix-32bit-rtpstorage-test.patch b/media-libs/gst-plugins-good/files/1.14.1-fix-32bit-rtpstorage-test.patch
new file mode 100644
index 000000000000..3bca4f6cd6ed
--- /dev/null
+++ b/media-libs/gst-plugins-good/files/1.14.1-fix-32bit-rtpstorage-test.patch
@@ -0,0 +1,112 @@
+From 48dd93662d6c16fc5967ef4386a63db41683142d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?=
+Date: Sun, 27 May 2018 20:29:47 +0100
+Subject: tests: rtpstorage: fix potential crashes / test failures on 32-bit
+
+Pass 64 bits to g_object_set() for 64-bit integer properties like
+rtpstorage's "size-time" property.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=796429
+---
+ tests/check/elements/rtpstorage.c | 21 +++++++++++----------
+ tests/check/elements/rtpulpfec.c | 3 ++-
+ 2 files changed, 13 insertions(+), 11 deletions(-)
+
+diff --git a/tests/check/elements/rtpstorage.c b/tests/check/elements/rtpstorage.c
+index 4a1d60f..e80b212 100644
+--- a/tests/check/elements/rtpstorage.c
++++ b/tests/check/elements/rtpstorage.c
+@@ -98,16 +98,17 @@ GST_START_TEST (rtpstorage_resize)
+ guint i, j;
+ GstBuffer *bufin, *bufout, *bufs[10];
+ GstHarness *h = gst_harness_new ("rtpstorage");
++
+ gst_harness_set_src_caps_str (h, "application/x-rtp");
+
+- g_object_set (h->element, "size-time", 0, NULL);
++ g_object_set (h->element, "size-time", (guint64) 0, NULL);
+ bufin = create_rtp_packet (96, 0xabe2b0b, 0x111111, 0);
+ bufout = gst_harness_push_and_pull (h, bufin);
+ fail_unless (bufin == bufout);
+ fail_unless (gst_buffer_is_writable (bufout));
+
+- g_object_set (h->element, "size-time",
+- (G_N_ELEMENTS (bufs) - 1) * RTP_PACKET_DUR, NULL);
++ g_object_set (h->element,
++ "size-time", (guint64) (G_N_ELEMENTS (bufs) - 1) * RTP_PACKET_DUR, NULL);
+
+ // Pushing 10 buffers all of them should have ref. count =2
+ for (i = 0; i < G_N_ELEMENTS (bufs); ++i) {
+@@ -139,7 +140,7 @@ GST_START_TEST (rtpstorage_stop_redundant_packets)
+ GstHarness *h = gst_harness_new ("rtpstorage");
+ GstBuffer *bufinp;
+
+- g_object_set (h->element, "size-time", 2 * RTP_PACKET_DUR, NULL);
++ g_object_set (h->element, "size-time", (guint64) 2 * RTP_PACKET_DUR, NULL);
+ gst_harness_set_src_caps_str (h, "application/x-rtp");
+
+ bufinp = create_rtp_packet (96, 0xabe2b0b, 0x111111, 0);
+@@ -159,7 +160,7 @@ GST_START_TEST (rtpstorage_unknown_ssrc)
+ {
+ GstBufferList *bufs_out;
+ GstHarness *h = gst_harness_new ("rtpstorage");
+- g_object_set (h->element, "size-time", RTP_PACKET_DUR, NULL);
++ g_object_set (h->element, "size-time", (guint64) RTP_PACKET_DUR, NULL);
+ gst_harness_set_src_caps_str (h, "application/x-rtp");
+
+ /* No packets has been pushed through yet */
+@@ -182,7 +183,7 @@ GST_START_TEST (rtpstorage_packet_not_lost)
+ GstBuffer *buf;
+ GstBufferList *bufs_out;
+ GstHarness *h = gst_harness_new ("rtpstorage");
+- g_object_set (h->element, "size-time", 10 * RTP_PACKET_DUR, NULL);
++ g_object_set (h->element, "size-time", (guint64) 10 * RTP_PACKET_DUR, NULL);
+ gst_harness_set_src_caps_str (h, "application/x-rtp");
+
+ /* Pushing through 2 frames + 2 FEC */
+@@ -212,7 +213,7 @@ GST_START_TEST (test_rtpstorage_put_recovered_packet)
+ GstBuffer *bufs_in[4];
+ GstBufferList *bufs_out;
+ GstHarness *h = gst_harness_new ("rtpstorage");
+- g_object_set (h->element, "size-time", 10 * RTP_PACKET_DUR, NULL);
++ g_object_set (h->element, "size-time", (guint64) 10 * RTP_PACKET_DUR, NULL);
+ gst_harness_set_src_caps_str (h, "application/x-rtp");
+
+ /* Pushing through 2 frames + 2 FEC
+@@ -331,7 +332,7 @@ _multiple_ssrcs_test (guint16 nth_to_loose,
+ guint16 stream0_seq_start = 200;
+ guint16 stream1_seq_start = 65529;
+ GstHarness *h = gst_harness_new ("rtpstorage");
+- g_object_set (h->element, "size-time", 12 * RTP_PACKET_DUR, NULL);
++ g_object_set (h->element, "size-time", (guint64) 12 * RTP_PACKET_DUR, NULL);
+ gst_harness_set_src_caps_str (h, "application/x-rtp");
+
+ _single_ssrc_test (h, 0x0abe2b0b, stream0_seq_start,
+@@ -453,8 +454,8 @@ GST_START_TEST (rtpstorage_stress)
+ StressTestData test_data;
+ guint seed, i, total, requested;
+ GstHarness *h = gst_harness_new ("rtpstorage");
+- g_object_set (h->element, "size-time",
+- STRESS_TEST_STORAGE_DEPTH * RTP_PACKET_DUR, NULL);
++ g_object_set (h->element,
++ "size-time", (guint64) STRESS_TEST_STORAGE_DEPTH * RTP_PACKET_DUR, NULL);
+
+ /* The stress test pushes buffers with STRESS_TEST_SSRCS different
+ * ssrcs from one thread and requests packets for FEC recovery from
+diff --git a/tests/check/elements/rtpulpfec.c b/tests/check/elements/rtpulpfec.c
+index e0fa972..57de5cd 100644
+--- a/tests/check/elements/rtpulpfec.c
++++ b/tests/check/elements/rtpulpfec.c
+@@ -154,7 +154,8 @@ harness_rtpulpfecdec (guint32 ssrc, guint8 lost_pt, guint8 fec_pt)
+ g_strdup_printf ("application/x-rtp,ssrc=(uint)%u,payload=(int)%u",
+ ssrc, lost_pt);
+
+- gst_harness_set (h, "rtpstorage", "size-time", 200 * RTP_PACKET_DUR, NULL);
++ gst_harness_set (h, "rtpstorage", "size-time", (guint64) 200 * RTP_PACKET_DUR,
++ NULL);
+ gst_harness_get (h, "rtpstorage", "internal-storage", &internal_storage,
+ NULL);
+ gst_harness_set (h, "rtpulpfecdec", "storage", internal_storage, "pt", fec_pt,
+--
+cgit v1.1
+
diff --git a/media-libs/gst-plugins-good/gst-plugins-good-1.14.1.ebuild b/media-libs/gst-plugins-good/gst-plugins-good-1.14.1.ebuild
index 8cb61b850058..23cb4d95b30d 100644
--- a/media-libs/gst-plugins-good/gst-plugins-good-1.14.1.ebuild
+++ b/media-libs/gst-plugins-good/gst-plugins-good-1.14.1.ebuild
@@ -25,6 +25,8 @@ DEPEND="${RDEPEND}
>=dev-util/gtk-doc-am-1.12
"
+PATCHES=( "${FILESDIR}"/${PV}-fix-32bit-rtpstorage-test.patch )
+
multilib_src_configure() {
# Always enable optional bz2 support for matroska
# Always enable optional zlib support for qtdemux and matroska