Skip to content

gstreamer: Optimize `Buffer` / `Memory` `from_slice()` to have fewer allocations

Sebastian Dröge requested to merge slomo/gstreamer-rs:rust-allocator into main

Instead of using gst_memory_new_wrapped_full() and boxing the data, create an GstAllocator subclass that allows allocating memories that store the data inline.

By avoiding the box, one additional heap allocation per memory is avoided.

Fixes #498 (closed)

Merge request reports

Loading