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, 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;
} }