summaryrefslogtreecommitdiffstats
path: root/gst/mxf/mxfup.c
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-12-08 13:48:46 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-12-08 13:48:46 +0000
commitd7a23866d232a457c1e7e7ea94baee15c5b32e89 (patch)
tree9f2d3f1b1e3b1ba32be7deb48d52c78a1b24fc4e /gst/mxf/mxfup.c
parent332e5ec000ef3c5f2e36ad2f68ad7460a9dbbf64 (diff)
downloadgst-plugins-bad-d7a23866d232a457c1e7e7ea94baee15c5b32e89.tar.gz
gst-plugins-bad-d7a23866d232a457c1e7e7ea94baee15c5b32e89.tar.bz2
gst-plugins-bad-d7a23866d232a457c1e7e7ea94baee15c5b32e89.zip
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.
Diffstat (limited to 'gst/mxf/mxfup.c')
-rw-r--r--gst/mxf/mxfup.c12
1 files changed, 4 insertions, 8 deletions
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;
}
}