summaryrefslogtreecommitdiff
path: root/gst/mpegtsmux
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2012-06-04 14:54:55 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-06-06 10:31:19 +0200
commitd97d49d2379d8e17e8d4d89bb89c5ca0e7d547b4 (patch)
tree79089b0c6843fa00626551ec3f9e982c6d68f0ac /gst/mpegtsmux
parent281f48f66eec04e5b789a223d4e3f9583455697c (diff)
downloadgstreamer-plugins-bad-d97d49d2379d8e17e8d4d89bb89c5ca0e7d547b4.tar.gz
mpegtsmux: avoid separate allocation for list of programs
Diffstat (limited to 'gst/mpegtsmux')
-rw-r--r--gst/mpegtsmux/mpegtsmux.c5
-rw-r--r--gst/mpegtsmux/mpegtsmux.h2
2 files changed, 1 insertions, 6 deletions
diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
index 580b64c08..e8da5b275 100644
--- a/gst/mpegtsmux/mpegtsmux.c
+++ b/gst/mpegtsmux/mpegtsmux.c
@@ -241,7 +241,6 @@ mpegtsmux_init (MpegTsMux * mux, MpegTsMuxClass * g_class)
mux->tsmux = tsmux_new ();
tsmux_set_write_func (mux->tsmux, new_packet_cb, mux);
- mux->programs = g_new0 (TsMuxProgram *, MAX_PROG_NUMBER);
mux->first = TRUE;
mux->last_flow_ret = GST_FLOW_OK;
mux->adapter = gst_adapter_new ();
@@ -281,10 +280,6 @@ mpegtsmux_dispose (GObject * object)
gst_structure_free (mux->prog_map);
mux->prog_map = NULL;
}
- if (mux->programs) {
- g_free (mux->programs);
- mux->programs = NULL;
- }
if (mux->streamheader) {
GstBuffer *buf;
GList *sh;
diff --git a/gst/mpegtsmux/mpegtsmux.h b/gst/mpegtsmux/mpegtsmux.h
index da2c9484e..88e0b653a 100644
--- a/gst/mpegtsmux/mpegtsmux.h
+++ b/gst/mpegtsmux/mpegtsmux.h
@@ -132,7 +132,7 @@ struct MpegTsMux {
GstCollectPads2 *collect;
TsMux *tsmux;
- TsMuxProgram **programs;
+ TsMuxProgram *programs[MAX_PROG_NUMBER];
GstStructure *prog_map;
gboolean first;