adapter: use buffer_wrap

This commit is contained in:
Wim Taymans 2012-03-31 18:34:23 +02:00
parent 113b9dc535
commit d89719a4b3

View 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);