Instead of using g_array_free which is not thread safe use g_array_unref instead
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1203>
gst_ebml_read_clear (GstEbmlRead * ebml)
{
if (ebml->readers)
- g_array_free (ebml->readers, TRUE);
+ g_array_unref (ebml->readers);
ebml->readers = NULL;
if (ebml->buf) {
gst_buffer_unmap (ebml->buf, &ebml->map);
demux->tracks_parsed = FALSE;
if (demux->clusters) {
- g_array_free (demux->clusters, TRUE);
+ g_array_unref (demux->clusters);
demux->clusters = NULL;
}
g_free (enc->comp_settings);
}
- g_array_free (track->encodings, TRUE);
+ g_array_unref (track->encodings);
}
if (track->tags)
gst_tag_list_unref (track->tags);
if (track->index_table)
- g_array_free (track->index_table, TRUE);
+ g_array_unref (track->index_table);
if (track->stream_headers)
gst_buffer_list_unref (track->stream_headers);
guint i;
if (common->index)
- g_array_free (common->index, TRUE);
+ g_array_unref (common->index);
common->index =
g_array_sized_new (FALSE, FALSE, sizeof (GstMatroskaIndex), 128);
/* sanity check; empty index normalizes to no index */
if (common->index->len == 0) {
- g_array_free (common->index, TRUE);
+ g_array_unref (common->index);
common->index = NULL;
}
/* reset indexes */
if (ctx->index) {
- g_array_free (ctx->index, TRUE);
+ g_array_unref (ctx->index);
ctx->index = NULL;
}