gstbuffer: Use g_memdup2 instead of g_memdup

This was added in !826 which was created after !803 (which changes
g_memdup -> g_memdup2), but merged before it, so it slipped through.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/866>
This commit is contained in:
Nirbheek Chauhan 2021-08-13 19:21:41 +05:30
parent bb48c4c9f6
commit e9d06cec5a

View file

@ -133,6 +133,9 @@
#include "gstutils.h"
#include "gstversion.h"
/* For g_memdup2 */
#include "glib-compat-private.h"
GType _gst_buffer_type = 0;
/* info->size will be sizeof(FooMeta) which contains a GstMeta at the beginning
@ -1053,7 +1056,7 @@ gst_buffer_new_wrapped_bytes (GBytes * bytes)
GstBuffer *
gst_buffer_new_memdup (gconstpointer data, gsize size)
{
gpointer data2 = g_memdup (data, size);
gpointer data2 = g_memdup2 (data, size);
return gst_buffer_new_wrapped_full (0, data2, size, 0, size, data2, g_free);
}