wpesrcbin: Use gst_buffer_new_memdup()

g_memdup() is deprecated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2406>
This commit is contained in:
Philippe Normand 2021-07-13 16:55:30 +01:00 committed by GStreamer Marge Bot
parent 55ccc581b2
commit 108eba3603

View file

@ -276,7 +276,7 @@ gst_wpe_src_push_audio_buffer (GstWpeSrc* src, guint32 id, guint64 size)
GST_TRACE_OBJECT (audio_pad, "Handling incoming audio packet");
gpointer data = mmap (0, size, PROT_READ, MAP_PRIVATE, audio_pad->fd, 0);
buffer = gst_buffer_new_wrapped (g_memdup(data, size), size);
buffer = gst_buffer_new_memdup (data, size);
munmap (data, size);
gst_buffer_add_audio_meta (buffer, &audio_pad->info, size, NULL);