1 |
commit: 98cf3f1b82c3d75d75c11458d1d8fb25aa148ae3 |
2 |
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 30 06:09:36 2018 +0000 |
4 |
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 30 06:09:55 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98cf3f1b |
7 |
|
8 |
media-libs/gst-plugins-good: fix potential 32bit test failures |
9 |
|
10 |
Closes: https://bugs.gentoo.org/661528 |
11 |
Package-Manager: Portage-2.3.43, Repoman-2.3.10 |
12 |
|
13 |
.../files/1.14.1-fix-32bit-rtpstorage-test.patch | 112 +++++++++++++++++++++ |
14 |
.../gst-plugins-good-1.14.1.ebuild | 2 + |
15 |
2 files changed, 114 insertions(+) |
16 |
|
17 |
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 |
18 |
new file mode 100644 |
19 |
index 00000000000..3bca4f6cd6e |
20 |
--- /dev/null |
21 |
+++ b/media-libs/gst-plugins-good/files/1.14.1-fix-32bit-rtpstorage-test.patch |
22 |
@@ -0,0 +1,112 @@ |
23 |
+From 48dd93662d6c16fc5967ef4386a63db41683142d Mon Sep 17 00:00:00 2001 |
24 |
+From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= |
25 |
+Date: Sun, 27 May 2018 20:29:47 +0100 |
26 |
+Subject: tests: rtpstorage: fix potential crashes / test failures on 32-bit |
27 |
+ |
28 |
+Pass 64 bits to g_object_set() for 64-bit integer properties like |
29 |
+rtpstorage's "size-time" property. |
30 |
+ |
31 |
+https://bugzilla.gnome.org/show_bug.cgi?id=796429 |
32 |
+--- |
33 |
+ tests/check/elements/rtpstorage.c | 21 +++++++++++---------- |
34 |
+ tests/check/elements/rtpulpfec.c | 3 ++- |
35 |
+ 2 files changed, 13 insertions(+), 11 deletions(-) |
36 |
+ |
37 |
+diff --git a/tests/check/elements/rtpstorage.c b/tests/check/elements/rtpstorage.c |
38 |
+index 4a1d60f..e80b212 100644 |
39 |
+--- a/tests/check/elements/rtpstorage.c |
40 |
++++ b/tests/check/elements/rtpstorage.c |
41 |
+@@ -98,16 +98,17 @@ GST_START_TEST (rtpstorage_resize) |
42 |
+ guint i, j; |
43 |
+ GstBuffer *bufin, *bufout, *bufs[10]; |
44 |
+ GstHarness *h = gst_harness_new ("rtpstorage"); |
45 |
++ |
46 |
+ gst_harness_set_src_caps_str (h, "application/x-rtp"); |
47 |
+ |
48 |
+- g_object_set (h->element, "size-time", 0, NULL); |
49 |
++ g_object_set (h->element, "size-time", (guint64) 0, NULL); |
50 |
+ bufin = create_rtp_packet (96, 0xabe2b0b, 0x111111, 0); |
51 |
+ bufout = gst_harness_push_and_pull (h, bufin); |
52 |
+ fail_unless (bufin == bufout); |
53 |
+ fail_unless (gst_buffer_is_writable (bufout)); |
54 |
+ |
55 |
+- g_object_set (h->element, "size-time", |
56 |
+- (G_N_ELEMENTS (bufs) - 1) * RTP_PACKET_DUR, NULL); |
57 |
++ g_object_set (h->element, |
58 |
++ "size-time", (guint64) (G_N_ELEMENTS (bufs) - 1) * RTP_PACKET_DUR, NULL); |
59 |
+ |
60 |
+ // Pushing 10 buffers all of them should have ref. count =2 |
61 |
+ for (i = 0; i < G_N_ELEMENTS (bufs); ++i) { |
62 |
+@@ -139,7 +140,7 @@ GST_START_TEST (rtpstorage_stop_redundant_packets) |
63 |
+ GstHarness *h = gst_harness_new ("rtpstorage"); |
64 |
+ GstBuffer *bufinp; |
65 |
+ |
66 |
+- g_object_set (h->element, "size-time", 2 * RTP_PACKET_DUR, NULL); |
67 |
++ g_object_set (h->element, "size-time", (guint64) 2 * RTP_PACKET_DUR, NULL); |
68 |
+ gst_harness_set_src_caps_str (h, "application/x-rtp"); |
69 |
+ |
70 |
+ bufinp = create_rtp_packet (96, 0xabe2b0b, 0x111111, 0); |
71 |
+@@ -159,7 +160,7 @@ GST_START_TEST (rtpstorage_unknown_ssrc) |
72 |
+ { |
73 |
+ GstBufferList *bufs_out; |
74 |
+ GstHarness *h = gst_harness_new ("rtpstorage"); |
75 |
+- g_object_set (h->element, "size-time", RTP_PACKET_DUR, NULL); |
76 |
++ g_object_set (h->element, "size-time", (guint64) RTP_PACKET_DUR, NULL); |
77 |
+ gst_harness_set_src_caps_str (h, "application/x-rtp"); |
78 |
+ |
79 |
+ /* No packets has been pushed through yet */ |
80 |
+@@ -182,7 +183,7 @@ GST_START_TEST (rtpstorage_packet_not_lost) |
81 |
+ GstBuffer *buf; |
82 |
+ GstBufferList *bufs_out; |
83 |
+ GstHarness *h = gst_harness_new ("rtpstorage"); |
84 |
+- g_object_set (h->element, "size-time", 10 * RTP_PACKET_DUR, NULL); |
85 |
++ g_object_set (h->element, "size-time", (guint64) 10 * RTP_PACKET_DUR, NULL); |
86 |
+ gst_harness_set_src_caps_str (h, "application/x-rtp"); |
87 |
+ |
88 |
+ /* Pushing through 2 frames + 2 FEC */ |
89 |
+@@ -212,7 +213,7 @@ GST_START_TEST (test_rtpstorage_put_recovered_packet) |
90 |
+ GstBuffer *bufs_in[4]; |
91 |
+ GstBufferList *bufs_out; |
92 |
+ GstHarness *h = gst_harness_new ("rtpstorage"); |
93 |
+- g_object_set (h->element, "size-time", 10 * RTP_PACKET_DUR, NULL); |
94 |
++ g_object_set (h->element, "size-time", (guint64) 10 * RTP_PACKET_DUR, NULL); |
95 |
+ gst_harness_set_src_caps_str (h, "application/x-rtp"); |
96 |
+ |
97 |
+ /* Pushing through 2 frames + 2 FEC |
98 |
+@@ -331,7 +332,7 @@ _multiple_ssrcs_test (guint16 nth_to_loose, |
99 |
+ guint16 stream0_seq_start = 200; |
100 |
+ guint16 stream1_seq_start = 65529; |
101 |
+ GstHarness *h = gst_harness_new ("rtpstorage"); |
102 |
+- g_object_set (h->element, "size-time", 12 * RTP_PACKET_DUR, NULL); |
103 |
++ g_object_set (h->element, "size-time", (guint64) 12 * RTP_PACKET_DUR, NULL); |
104 |
+ gst_harness_set_src_caps_str (h, "application/x-rtp"); |
105 |
+ |
106 |
+ _single_ssrc_test (h, 0x0abe2b0b, stream0_seq_start, |
107 |
+@@ -453,8 +454,8 @@ GST_START_TEST (rtpstorage_stress) |
108 |
+ StressTestData test_data; |
109 |
+ guint seed, i, total, requested; |
110 |
+ GstHarness *h = gst_harness_new ("rtpstorage"); |
111 |
+- g_object_set (h->element, "size-time", |
112 |
+- STRESS_TEST_STORAGE_DEPTH * RTP_PACKET_DUR, NULL); |
113 |
++ g_object_set (h->element, |
114 |
++ "size-time", (guint64) STRESS_TEST_STORAGE_DEPTH * RTP_PACKET_DUR, NULL); |
115 |
+ |
116 |
+ /* The stress test pushes buffers with STRESS_TEST_SSRCS different |
117 |
+ * ssrcs from one thread and requests packets for FEC recovery from |
118 |
+diff --git a/tests/check/elements/rtpulpfec.c b/tests/check/elements/rtpulpfec.c |
119 |
+index e0fa972..57de5cd 100644 |
120 |
+--- a/tests/check/elements/rtpulpfec.c |
121 |
++++ b/tests/check/elements/rtpulpfec.c |
122 |
+@@ -154,7 +154,8 @@ harness_rtpulpfecdec (guint32 ssrc, guint8 lost_pt, guint8 fec_pt) |
123 |
+ g_strdup_printf ("application/x-rtp,ssrc=(uint)%u,payload=(int)%u", |
124 |
+ ssrc, lost_pt); |
125 |
+ |
126 |
+- gst_harness_set (h, "rtpstorage", "size-time", 200 * RTP_PACKET_DUR, NULL); |
127 |
++ gst_harness_set (h, "rtpstorage", "size-time", (guint64) 200 * RTP_PACKET_DUR, |
128 |
++ NULL); |
129 |
+ gst_harness_get (h, "rtpstorage", "internal-storage", &internal_storage, |
130 |
+ NULL); |
131 |
+ gst_harness_set (h, "rtpulpfecdec", "storage", internal_storage, "pt", fec_pt, |
132 |
+-- |
133 |
+cgit v1.1 |
134 |
+ |
135 |
|
136 |
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 |
137 |
index 8cb61b85005..23cb4d95b30 100644 |
138 |
--- a/media-libs/gst-plugins-good/gst-plugins-good-1.14.1.ebuild |
139 |
+++ b/media-libs/gst-plugins-good/gst-plugins-good-1.14.1.ebuild |
140 |
@@ -25,6 +25,8 @@ DEPEND="${RDEPEND} |
141 |
>=dev-util/gtk-doc-am-1.12 |
142 |
" |
143 |
|
144 |
+PATCHES=( "${FILESDIR}"/${PV}-fix-32bit-rtpstorage-test.patch ) |
145 |
+ |
146 |
multilib_src_configure() { |
147 |
# Always enable optional bz2 support for matroska |
148 |
# Always enable optional zlib support for qtdemux and matroska |