From 023af351fba4b22db782b39f4aa8ae75b70cc10f Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 11 May 2009 19:30:34 +0200 Subject: gstpesfilter: Directly use gst_adapter_take_buffer(). --- gst/mpegdemux/gstpesfilter.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'gst') diff --git a/gst/mpegdemux/gstpesfilter.c b/gst/mpegdemux/gstpesfilter.c index 4285c940..b520c766 100644 --- a/gst/mpegdemux/gstpesfilter.c +++ b/gst/mpegdemux/gstpesfilter.c @@ -565,14 +565,8 @@ gst_pes_filter_process (GstPESFilter * filter) ret = GST_FLOW_OK; } else { GstBuffer *out; - guint8 *data; - data = gst_adapter_take (filter->adapter, avail); - - out = gst_buffer_new (); - GST_BUFFER_DATA (out) = data; - GST_BUFFER_SIZE (out) = avail; - GST_BUFFER_MALLOCDATA (out) = data; + out = gst_adapter_take_buffer (filter->adapter, avail); ret = gst_pes_filter_data_push (filter, filter->first, out); filter->first = FALSE; -- cgit v1.2.1