diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2008-09-01 17:49:59 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2008-09-01 17:49:59 +0000 |
commit | 7ac077828f3fed0104757f2ce2407d69417823ea (patch) | |
tree | 0fa7df98f4d726d4b3a8bffbce108bf562fe19be /gst/mpegtsmux/mpegtsmux_aac.c | |
parent | b24d38315f03bdc84700e4da4bbd62563c9c0f1f (diff) | |
download | gst-plugins-bad-7ac077828f3fed0104757f2ce2407d69417823ea.tar.gz gst-plugins-bad-7ac077828f3fed0104757f2ce2407d69417823ea.tar.bz2 gst-plugins-bad-7ac077828f3fed0104757f2ce2407d69417823ea.zip |
gst/mpegtsmux/mpegtsmux_aac.c: Allocate a fixed size buffer on the stack instead of using malloc().
Original commit message from CVS:
* gst/mpegtsmux/mpegtsmux_aac.c: (mpegtsmux_prepare_aac):
Allocate a fixed size buffer on the stack instead of using malloc().
* gst/mpegtsmux/tsmux/tsmux.c: (tsmux_new), (tsmux_free),
(tsmux_program_new), (tsmux_program_free):
* gst/mpegtsmux/tsmux/tsmuxstream.c: (tsmux_stream_new),
(tsmux_stream_free), (tsmux_stream_consume),
(tsmux_stream_add_data):
Use GSlice.
Diffstat (limited to 'gst/mpegtsmux/mpegtsmux_aac.c')
-rw-r--r-- | gst/mpegtsmux/mpegtsmux_aac.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gst/mpegtsmux/mpegtsmux_aac.c b/gst/mpegtsmux/mpegtsmux_aac.c index 71727f21..5afefc83 100644 --- a/gst/mpegtsmux/mpegtsmux_aac.c +++ b/gst/mpegtsmux/mpegtsmux_aac.c @@ -93,7 +93,7 @@ GST_DEBUG_CATEGORY_EXTERN (mpegtsmux_debug); GstBuffer * mpegtsmux_prepare_aac (GstBuffer * buf, MpegTsPadData * data, MpegTsMux * mux) { - guint8 *adts_header = g_malloc0 (7); + guint8 adts_header[7] = { 0, }; GstBuffer *out_buf = gst_buffer_new_and_alloc (GST_BUFFER_SIZE (buf) + 7); gsize out_offset = 0; guint8 rate_idx = 0, channels = 0, obj_type = 0; @@ -140,7 +140,6 @@ mpegtsmux_prepare_aac (GstBuffer * buf, MpegTsPadData * data, MpegTsMux * mux) /* Insert ADTS header */ memcpy (GST_BUFFER_DATA (out_buf) + out_offset, adts_header, 7); - g_free (adts_header); out_offset += 7; /* Now copy complete frame */ |