mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-09 05:11:53 +00:00
mpegtsmux: avoid separate allocation for list of programs
This commit is contained in:
parent
281f48f66e
commit
d97d49d237
2 changed files with 1 additions and 6 deletions
|
@ -241,7 +241,6 @@ mpegtsmux_init (MpegTsMux * mux, MpegTsMuxClass * g_class)
|
||||||
mux->tsmux = tsmux_new ();
|
mux->tsmux = tsmux_new ();
|
||||||
tsmux_set_write_func (mux->tsmux, new_packet_cb, mux);
|
tsmux_set_write_func (mux->tsmux, new_packet_cb, mux);
|
||||||
|
|
||||||
mux->programs = g_new0 (TsMuxProgram *, MAX_PROG_NUMBER);
|
|
||||||
mux->first = TRUE;
|
mux->first = TRUE;
|
||||||
mux->last_flow_ret = GST_FLOW_OK;
|
mux->last_flow_ret = GST_FLOW_OK;
|
||||||
mux->adapter = gst_adapter_new ();
|
mux->adapter = gst_adapter_new ();
|
||||||
|
@ -281,10 +280,6 @@ mpegtsmux_dispose (GObject * object)
|
||||||
gst_structure_free (mux->prog_map);
|
gst_structure_free (mux->prog_map);
|
||||||
mux->prog_map = NULL;
|
mux->prog_map = NULL;
|
||||||
}
|
}
|
||||||
if (mux->programs) {
|
|
||||||
g_free (mux->programs);
|
|
||||||
mux->programs = NULL;
|
|
||||||
}
|
|
||||||
if (mux->streamheader) {
|
if (mux->streamheader) {
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
GList *sh;
|
GList *sh;
|
||||||
|
|
|
@ -132,7 +132,7 @@ struct MpegTsMux {
|
||||||
GstCollectPads2 *collect;
|
GstCollectPads2 *collect;
|
||||||
|
|
||||||
TsMux *tsmux;
|
TsMux *tsmux;
|
||||||
TsMuxProgram **programs;
|
TsMuxProgram *programs[MAX_PROG_NUMBER];
|
||||||
GstStructure *prog_map;
|
GstStructure *prog_map;
|
||||||
|
|
||||||
gboolean first;
|
gboolean first;
|
||||||
|
|
Loading…
Reference in a new issue