From d7a23866d232a457c1e7e7ea94baee15c5b32e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 8 Dec 2008 13:48:46 +0000 Subject: gst/mxf/mxfup.c: Don't create a subbuffer, instead just change the buffer metadata of the input buffer. Original commit message from CVS: * gst/mxf/mxfup.c: (mxf_up_handle_essence_element): Don't create a subbuffer, instead just change the buffer metadata of the input buffer. --- gst/mxf/mxfup.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'gst') diff --git a/gst/mxf/mxfup.c b/gst/mxf/mxfup.c index 77adcc03..a9e0826a 100644 --- a/gst/mxf/mxfup.c +++ b/gst/mxf/mxfup.c @@ -94,14 +94,10 @@ mxf_up_handle_essence_element (const MXFUL * key, GstBuffer * buffer, GST_ERROR ("Invalid buffer size"); return GST_FLOW_ERROR; } else { - *outbuf = - gst_buffer_create_sub (buffer, data->image_start_offset, - GST_BUFFER_SIZE (buffer) - data->image_end_offset - - data->image_start_offset); - gst_buffer_copy_metadata (*outbuf, buffer, - GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS | - GST_BUFFER_COPY_CAPS); - gst_buffer_unref (buffer); + GST_BUFFER_DATA (buffer) += data->image_start_offset; + GST_BUFFER_SIZE (buffer) -= data->image_start_offset; + GST_BUFFER_SIZE (buffer) -= data->image_end_offset; + *outbuf = buffer; } } -- cgit v1.2.1