From 967088f0740082e2ab4ea3da18e66a9e4ac49bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 27 Oct 2008 09:45:04 +0000 Subject: gst/flv/: Don't memcpy() all data we want to push downstream, instead just create subbuffers and push them downstream. Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_chain), (gst_flv_demux_pull_tag), (gst_flv_demux_pull_header), (gst_flv_demux_create_index): * gst/flv/gstflvparse.c: (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_tag_timestamp), (gst_flv_parse_tag_type), (gst_flv_parse_header): * gst/flv/gstflvparse.h: Don't memcpy() all data we want to push downstream, instead just create subbuffers and push them downstream. Fix some minor memory leaks. --- gst/flv/gstflvparse.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'gst/flv/gstflvparse.h') diff --git a/gst/flv/gstflvparse.h b/gst/flv/gstflvparse.h index 55eae29e..203d30de 100644 --- a/gst/flv/gstflvparse.h +++ b/gst/flv/gstflvparse.h @@ -23,22 +23,20 @@ #include "gstflvdemux.h" G_BEGIN_DECLS - GstFlowReturn gst_flv_parse_tag_script (GstFLVDemux * demux, - const guint8 * data, size_t data_size); -GstFlowReturn gst_flv_parse_tag_audio (GstFLVDemux * demux, const guint8 * data, - size_t data_size); -GstFlowReturn gst_flv_parse_tag_video (GstFLVDemux * demux, const guint8 * data, - size_t data_size); +GstFlowReturn gst_flv_parse_tag_script (GstFLVDemux * demux, + GstBuffer *buffer); -GstFlowReturn gst_flv_parse_tag_type (GstFLVDemux * demux, const guint8 * data, - size_t data_size); +GstFlowReturn gst_flv_parse_tag_audio (GstFLVDemux * demux, GstBuffer *buffer); -GstFlowReturn gst_flv_parse_header (GstFLVDemux * demux, const guint8 * data, - size_t data_size); +GstFlowReturn gst_flv_parse_tag_video (GstFLVDemux * demux, GstBuffer *buffer); -GstClockTime gst_flv_parse_tag_timestamp (GstFLVDemux *demux, const guint8 *data, size_t data_size, size_t *tag_data_size); +GstFlowReturn gst_flv_parse_tag_type (GstFLVDemux * demux, GstBuffer *buffer); + +GstFlowReturn gst_flv_parse_header (GstFLVDemux * demux, GstBuffer *buffer); + +GstClockTime gst_flv_parse_tag_timestamp (GstFLVDemux *demux, GstBuffer *buffer, size_t *tag_data_size); G_END_DECLS #endif /* __FLV_PARSE_H__ */ -- cgit v1.2.1