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:
Edward Hervey 2013-05-29 17:20:34 +02:00
parent 76f0e18f92
commit e1f520f27c

View file

@ -761,12 +761,14 @@ gst_buffer_new_wrapped_full (GstMemoryFlags flags, gpointer data,
gsize maxsize, gsize offset, gsize size, gpointer user_data,
GDestroyNotify notify)
{
GstMemory *mem;
GstBuffer *newbuf;
newbuf = gst_buffer_new ();
gst_buffer_append_memory (newbuf,
gst_memory_new_wrapped (flags, data, maxsize, offset, size,
user_data, notify));
mem =
gst_memory_new_wrapped (flags, data, maxsize, offset, size, user_data,
notify);
_memory_add (newbuf, -1, mem, TRUE);
return newbuf;
}