Skip to content

Commit 7f73f8f

Browse files
authored
Merge pull request #1299 from emutavchi/g_memdup2-build-fix
Fix build with glib < 2.68
2 parents 2d9c61e + 100bab4 commit 7f73f8f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,11 @@ bool gstObjectHasProperty(GstPad* pad, const char* name)
909909
#if !GST_CHECK_VERSION(1, 20, 0)
910910
GstBuffer* gst_buffer_new_memdup(gconstpointer data, gsize size)
911911
{
912+
#if GLIB_CHECK_VERSION(2, 68, 0)
912913
gpointer data2 = g_memdup2(data, size);
914+
#else
915+
gpointer data2 = g_memdup(data, size);
916+
#endif
913917

914918
return gst_buffer_new_wrapped_full(static_cast<GstMemoryFlags>(0), data2, size, 0, size, data2, g_free);
915919
}

0 commit comments

Comments
 (0)