mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
matroska: Use g_array_unref everywhere
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>
This commit is contained in:
parent
972615cf22
commit
478f94edc7
4 changed files with 7 additions and 7 deletions
|
@ -175,7 +175,7 @@ void
|
|||
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);
|
||||
|
|
|
@ -328,7 +328,7 @@ gst_matroska_demux_reset (GstElement * element)
|
|||
demux->tracks_parsed = FALSE;
|
||||
|
||||
if (demux->clusters) {
|
||||
g_array_free (demux->clusters, TRUE);
|
||||
g_array_unref (demux->clusters);
|
||||
demux->clusters = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -349,14 +349,14 @@ gst_matroska_track_free (GstMatroskaTrackContext * track)
|
|||
|
||||
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);
|
||||
|
|
|
@ -1809,7 +1809,7 @@ gst_matroska_read_common_parse_index (GstMatroskaReadCommon * common,
|
|||
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);
|
||||
|
||||
|
@ -1897,7 +1897,7 @@ gst_matroska_read_common_parse_index (GstMatroskaReadCommon * common,
|
|||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
|
@ -3319,7 +3319,7 @@ gst_matroska_read_common_reset (GstElement * element,
|
|||
|
||||
/* reset indexes */
|
||||
if (ctx->index) {
|
||||
g_array_free (ctx->index, TRUE);
|
||||
g_array_unref (ctx->index);
|
||||
ctx->index = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue