mpegtsmux: avoid separate allocation for list of programs

This commit is contained in:
Mark Nauwelaerts 2012-06-04 14:54:55 +02:00 committed by Sebastian Dröge
parent 281f48f66e
commit d97d49d237
2 changed files with 1 additions and 6 deletions

View file

@ -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;

View file

@ -132,7 +132,7 @@ struct MpegTsMux {
GstCollectPads2 *collect;
TsMux *tsmux;
TsMuxProgram **programs;
TsMuxProgram *programs[MAX_PROG_NUMBER];
GstStructure *prog_map;
gboolean first;