adapter: use buffer_wrap
authorWim Taymans <wim.taymans@collabora.co.uk>
Sat, 31 Mar 2012 16:34:23 +0000 (18:34 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Sat, 31 Mar 2012 16:34:23 +0000 (18:34 +0200)
libs/gst/base/gstadapter.c

index 382611c..3342536 100644 (file)
@@ -768,9 +768,7 @@ gst_adapter_take_buffer (GstAdapter * adapter, gsize nbytes)
 
   data = gst_adapter_take_internal (adapter, nbytes);
 
-  buffer = gst_buffer_new ();
-  gst_buffer_append_memory (buffer,
-      gst_memory_new_wrapped (0, data, nbytes, 0, nbytes, data, g_free));
+  buffer = gst_buffer_new_wrapped (data, nbytes);
 
 done:
   gst_adapter_flush_unchecked (adapter, nbytes);