mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
mxfmux: fix index entry leak
https://bugzilla.gnome.org/show_bug.cgi?id=781023
This commit is contained in:
parent
b817f16e19
commit
8a5d6397c1
1 changed files with 9 additions and 0 deletions
|
@ -208,6 +208,10 @@ gst_mxf_mux_finalize (GObject * object)
|
|||
}
|
||||
|
||||
if (mux->index_table) {
|
||||
gsize n;
|
||||
for (n = 0; n < mux->index_table->len; ++n)
|
||||
g_free (g_array_index (mux->index_table, MXFIndexTableSegment,
|
||||
n).index_entries);
|
||||
g_array_free (mux->index_table, TRUE);
|
||||
mux->index_table = NULL;
|
||||
}
|
||||
|
@ -219,6 +223,7 @@ static void
|
|||
gst_mxf_mux_reset (GstMXFMux * mux)
|
||||
{
|
||||
GList *l;
|
||||
gsize n;
|
||||
|
||||
GST_OBJECT_LOCK (mux);
|
||||
for (l = GST_ELEMENT_CAST (mux)->sinkpads; l; l = l->next) {
|
||||
|
@ -255,6 +260,10 @@ gst_mxf_mux_reset (GstMXFMux * mux)
|
|||
mux->last_gc_position = 0;
|
||||
mux->offset = 0;
|
||||
|
||||
if (mux->index_table)
|
||||
for (n = 0; n < mux->index_table->len; ++n)
|
||||
g_free (g_array_index (mux->index_table, MXFIndexTableSegment,
|
||||
n).index_entries);
|
||||
g_array_set_size (mux->index_table, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue