From 309395ed4d38fab8c05ba6bae70b1121e892a26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 12 Jun 2014 10:17:10 +0100 Subject: [PATCH] hls: fix build with GLib 2.32 Provide internal copy of g_list_copy_deep() until we bump the GLib requirement. https://bugzilla.gnome.org/show_bug.cgi?id=731555 --- ext/hls/m3u8.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c index 72bc36fbd8..d1b3ed47ad 100644 --- a/ext/hls/m3u8.c +++ b/ext/hls/m3u8.c @@ -30,6 +30,25 @@ #define GST_CAT_DEFAULT fragmented_debug +#if !GLIB_CHECK_VERSION (2, 33, 4) +#define g_list_copy_deep gst_g_list_copy_deep +static GList * +gst_g_list_copy_deep (GList * list, GCopyFunc func, gpointer user_data) +{ + list = g_list_copy (list); + + if (func != NULL) { + GList *l; + + for (l = list; l != NULL; l = l->next) { + l->data = func (l->data, user_data); + } + } + + return list; +} +#endif + static GstM3U8 *gst_m3u8_new (void); static void gst_m3u8_free (GstM3U8 * m3u8); static gboolean gst_m3u8_update (GstM3U8 * m3u8, gchar * data,