+2017-02-07 Zan Dobersek <zdobersek@igalia.com>
+
+ MediaSourceClientGStreamerMSE: wrap FastMalloc-ed memory into pipeline-bound GstBuffers
+ https://bugs.webkit.org/show_bug.cgi?id=167928
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ The buffers created in MediaSourceClientGStreamerMSE can be large enough in size
+ that repetitive allocations can cause larger heap fragmentation in different libc
+ allocators. To avoid that occurrence, we should simply use FastMalloc to allocate
+ memory for these buffers.
+
+ * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
+ (WebCore::MediaSourceClientGStreamerMSE::append):
+
2017-02-07 Antoine Quint <graouts@apple.com>
[Modern Media Controls] Handle media durations of an hour or more gracefully
ASSERT(appendPipeline);
- GstBuffer* buffer = gst_buffer_new_and_alloc(length);
+ void* bufferData = fastMalloc(length);
+ GstBuffer* buffer = gst_buffer_new_wrapped_full(static_cast<GstMemoryFlags>(0), bufferData, length, 0, length, bufferData, fastFree);
gst_buffer_fill(buffer, 0, data, length);
return appendPipeline->pushNewBuffer(buffer) == GST_FLOW_OK;