mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
gstbuffer: Use internal function for buffer_new_wrapped
Shaves ~10% instruction calls from the total cost https://bugzilla.gnome.org/show_bug.cgi?id=701633
This commit is contained in:
parent
76f0e18f92
commit
e1f520f27c
1 changed files with 5 additions and 3 deletions
|
@ -761,12 +761,14 @@ gst_buffer_new_wrapped_full (GstMemoryFlags flags, gpointer data,
|
||||||
gsize maxsize, gsize offset, gsize size, gpointer user_data,
|
gsize maxsize, gsize offset, gsize size, gpointer user_data,
|
||||||
GDestroyNotify notify)
|
GDestroyNotify notify)
|
||||||
{
|
{
|
||||||
|
GstMemory *mem;
|
||||||
GstBuffer *newbuf;
|
GstBuffer *newbuf;
|
||||||
|
|
||||||
newbuf = gst_buffer_new ();
|
newbuf = gst_buffer_new ();
|
||||||
gst_buffer_append_memory (newbuf,
|
mem =
|
||||||
gst_memory_new_wrapped (flags, data, maxsize, offset, size,
|
gst_memory_new_wrapped (flags, data, maxsize, offset, size, user_data,
|
||||||
user_data, notify));
|
notify);
|
||||||
|
_memory_add (newbuf, -1, mem, TRUE);
|
||||||
|
|
||||||
return newbuf;
|
return newbuf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue