flv: use g_memdup2() as g_memdup() is deprecated
authorNirbheek Chauhan <nirbheek@centricular.com>
Fri, 13 Aug 2021 14:02:53 +0000 (19:32 +0530)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 16 Aug 2021 08:00:53 +0000 (08:00 +0000)
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-good/-/merge_requests/1052>

gst/flv/gstindex.c

index 79ceb04..4b11bb2 100644 (file)
@@ -813,7 +813,7 @@ gst_index_add_associationv (GstIndex * index, gint id,
   entry->type = GST_INDEX_ENTRY_ASSOCIATION;
   entry->id = id;
   entry->data.assoc.flags = flags;
-  entry->data.assoc.assocs = g_memdup (list, sizeof (GstIndexAssociation) * n);
+  entry->data.assoc.assocs = g_memdup2 (list, sizeof (GstIndexAssociation) * n);
   entry->data.assoc.nassocs = n;
 
   gst_index_add_entry (index, entry);