summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2021-05-23 19:15:25 +0100
committerNirbheek Chauhan <nirbheek@centricular.com>2021-08-05 20:51:00 +0530
commita561b1bd8601ed8ae8769339cc8d93c2c23e2d84 (patch)
tree632d06f7df0536e5e083826b182ddaf50a9503b1 /tests
parent743387052856352c9baa66b6c5c197e3ec5f452b (diff)
downloadgstreamer-plugins-bad-a561b1bd8601ed8ae8769339cc8d93c2c23e2d84.tar.gz
Use g_memdup2() where available and add fallback for older GLib versions
g_memdup() is deprecated since GLib 2.68 and we want to avoid deprecation warnings with recent versions of GLib. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2280>
Diffstat (limited to 'tests')
-rw-r--r--tests/check/libs/mpegts.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/check/libs/mpegts.c b/tests/check/libs/mpegts.c
index 219876805..55682f9cb 100644
--- a/tests/check/libs/mpegts.c
+++ b/tests/check/libs/mpegts.c
@@ -16,6 +16,9 @@
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
#include <gst/mpegts/mpegts.h>
@@ -509,7 +512,7 @@ GST_START_TEST (test_mpegts_atsc_stt)
guint8 *data;
GstDateTime *dt;
- data = g_memdup (stt_data_check, 20);
+ data = g_memdup2 (stt_data_check, 20);
section = gst_mpegts_section_new (0x1ffb, data, 20);
stt = gst_mpegts_section_get_atsc_stt (section);