gstreamer/gstreamer-sharp/glue/adapter.c
Maarten Bosmans 150423e10d Fix GstAdapter glue code
Fixes bug #584264.
2009-05-30 11:09:02 +02:00

13 lines
308 B
C

#include <gst/gst.h>
#include <gst/base/gstadapter.h>
GstBuffer *
gstsharp_gst_adapter_peek_buffer (GstAdapter *adapter, guint size) {
GstBuffer *ret = gst_buffer_try_new_and_alloc (size);
if (ret == NULL)
return NULL;
gst_adapter_copy (adapter, GST_BUFFER_DATA (ret), 0, size);
return ret;
}