Commit c629a441 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts

replace gst_tag_list_free with gst_tag_list_unref

parent f7c247b6
...@@ -224,7 +224,7 @@ gst_ogg_pad_dispose (GObject * object) ...@@ -224,7 +224,7 @@ gst_ogg_pad_dispose (GObject * object)
} }
if (pad->map.taglist) { if (pad->map.taglist) {
gst_tag_list_free (pad->map.taglist); gst_tag_list_unref (pad->map.taglist);
pad->map.taglist = NULL; pad->map.taglist = NULL;
} }
...@@ -1892,7 +1892,7 @@ gst_ogg_chain_new_stream (GstOggChain * chain, guint32 serialno) ...@@ -1892,7 +1892,7 @@ gst_ogg_chain_new_stream (GstOggChain * chain, guint32 serialno)
list = gst_tag_list_new_empty (); list = gst_tag_list_new_empty ();
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_SERIAL, serialno, gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_SERIAL, serialno,
NULL); NULL);
gst_tag_list_free (list); gst_tag_list_unref (list);
GST_DEBUG_OBJECT (chain->ogg, GST_DEBUG_OBJECT (chain->ogg,
"created new ogg src %p for stream with serial %08x", ret, serialno); "created new ogg src %p for stream with serial %08x", ret, serialno);
......
...@@ -330,7 +330,7 @@ gst_ogg_mux_sink_event (GstCollectPads * pads, GstCollectData * pad, ...@@ -330,7 +330,7 @@ gst_ogg_mux_sink_event (GstCollectPads * pads, GstCollectData * pad,
gst_event_parse_tag (event, &tags); gst_event_parse_tag (event, &tags);
tags = gst_tag_list_merge (ogg_pad->tags, tags, GST_TAG_MERGE_APPEND); tags = gst_tag_list_merge (ogg_pad->tags, tags, GST_TAG_MERGE_APPEND);
if (ogg_pad->tags) if (ogg_pad->tags)
gst_tag_list_free (ogg_pad->tags); gst_tag_list_unref (ogg_pad->tags);
ogg_pad->tags = tags; ogg_pad->tags = tags;
GST_DEBUG_OBJECT (ogg_mux, "Got tags %" GST_PTR_FORMAT, ogg_pad->tags); GST_DEBUG_OBJECT (ogg_mux, "Got tags %" GST_PTR_FORMAT, ogg_pad->tags);
...@@ -2061,7 +2061,7 @@ gst_ogg_mux_clear_collectpads (GstCollectPads * collect) ...@@ -2061,7 +2061,7 @@ gst_ogg_mux_clear_collectpads (GstCollectPads * collect)
} }
if (oggpad->tags) { if (oggpad->tags) {
gst_tag_list_free (oggpad->tags); gst_tag_list_unref (oggpad->tags);
oggpad->tags = NULL; oggpad->tags = NULL;
} }
......
...@@ -372,7 +372,7 @@ tag_list_from_vorbiscomment_packet (ogg_packet * packet, ...@@ -372,7 +372,7 @@ tag_list_from_vorbiscomment_packet (ogg_packet * packet,
exit: exit:
if (*tags) if (*tags)
gst_tag_list_free (*tags); gst_tag_list_unref (*tags);
*tags = list; *tags = list;
return ret; return ret;
...@@ -1856,7 +1856,7 @@ extract_tags_kate (GstOggStream * pad, ogg_packet * packet) ...@@ -1856,7 +1856,7 @@ extract_tags_kate (GstOggStream * pad, ogg_packet * packet)
/* ensure the comment packet cannot override the category/language /* ensure the comment packet cannot override the category/language
from the identification header */ from the identification header */
gst_tag_list_insert (pad->taglist, list, GST_TAG_MERGE_KEEP_ALL); gst_tag_list_insert (pad->taglist, list, GST_TAG_MERGE_KEEP_ALL);
gst_tag_list_free (list); gst_tag_list_unref (list);
} else } else
pad->taglist = list; pad->taglist = list;
} }
......
...@@ -257,7 +257,7 @@ vorbis_handle_comment_packet (GstVorbisDec * vd, ogg_packet * packet) ...@@ -257,7 +257,7 @@ vorbis_handle_comment_packet (GstVorbisDec * vd, ogg_packet * packet)
gst_audio_decoder_merge_tags (GST_AUDIO_DECODER_CAST (vd), list, gst_audio_decoder_merge_tags (GST_AUDIO_DECODER_CAST (vd), list,
GST_TAG_MERGE_REPLACE); GST_TAG_MERGE_REPLACE);
gst_tag_list_free (list); gst_tag_list_unref (list);
return GST_FLOW_OK; return GST_FLOW_OK;
} }
......
...@@ -241,7 +241,7 @@ gst_vorbis_enc_stop (GstAudioEncoder * enc) ...@@ -241,7 +241,7 @@ gst_vorbis_enc_stop (GstAudioEncoder * enc)
vorbis_info_clear (&vorbisenc->vi); vorbis_info_clear (&vorbisenc->vi);
g_free (vorbisenc->last_message); g_free (vorbisenc->last_message);
vorbisenc->last_message = NULL; vorbisenc->last_message = NULL;
gst_tag_list_free (vorbisenc->tags); gst_tag_list_unref (vorbisenc->tags);
vorbisenc->tags = NULL; vorbisenc->tags = NULL;
gst_tag_setter_reset_tags (GST_TAG_SETTER (enc)); gst_tag_setter_reset_tags (GST_TAG_SETTER (enc));
...@@ -386,7 +386,7 @@ gst_vorbis_enc_set_metadata (GstVorbisEnc * enc) ...@@ -386,7 +386,7 @@ gst_vorbis_enc_set_metadata (GstVorbisEnc * enc)
if (merged_tags) { if (merged_tags) {
GST_DEBUG_OBJECT (enc, "merged tags = %" GST_PTR_FORMAT, merged_tags); GST_DEBUG_OBJECT (enc, "merged tags = %" GST_PTR_FORMAT, merged_tags);
gst_tag_list_foreach (merged_tags, gst_vorbis_enc_metadata_set1, enc); gst_tag_list_foreach (merged_tags, gst_vorbis_enc_metadata_set1, enc);
gst_tag_list_free (merged_tags); gst_tag_list_unref (merged_tags);
} }
} }
......
...@@ -118,14 +118,14 @@ gst_vorbis_tag_parse_packet (GstVorbisParse * parse, GstBuffer * buffer) ...@@ -118,14 +118,14 @@ gst_vorbis_tag_parse_packet (GstVorbisParse * parse, GstBuffer * buffer)
/* build new tag list */ /* build new tag list */
new_tags = gst_tag_list_merge (user_tags, old_tags, new_tags = gst_tag_list_merge (user_tags, old_tags,
gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (tagger))); gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (tagger)));
gst_tag_list_free (old_tags); gst_tag_list_unref (old_tags);
new_buf = new_buf =
gst_tag_list_to_vorbiscomment_buffer (new_tags, (guint8 *) "\003vorbis", gst_tag_list_to_vorbiscomment_buffer (new_tags, (guint8 *) "\003vorbis",
7, encoder); 7, encoder);
gst_buffer_copy_into (new_buf, buffer, GST_BUFFER_COPY_TIMESTAMPS, 0, -1); gst_buffer_copy_into (new_buf, buffer, GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
gst_tag_list_free (new_tags); gst_tag_list_unref (new_tags);
g_free (encoder); g_free (encoder);
gst_buffer_unref (buffer); gst_buffer_unref (buffer);
......
...@@ -1644,7 +1644,7 @@ gst_audio_cd_src_clear_tracks (GstAudioCdSrc * src) ...@@ -1644,7 +1644,7 @@ gst_audio_cd_src_clear_tracks (GstAudioCdSrc * src)
for (i = 0; i < src->priv->num_all_tracks; ++i) { for (i = 0; i < src->priv->num_all_tracks; ++i) {
if (src->priv->tracks[i].tags) if (src->priv->tracks[i].tags)
gst_tag_list_free (src->priv->tracks[i].tags); gst_tag_list_unref (src->priv->tracks[i].tags);
} }
g_free (src->priv->tracks); g_free (src->priv->tracks);
...@@ -1667,7 +1667,7 @@ gst_audio_cd_src_stop (GstBaseSrc * basesrc) ...@@ -1667,7 +1667,7 @@ gst_audio_cd_src_stop (GstBaseSrc * basesrc)
gst_audio_cd_src_clear_tracks (src); gst_audio_cd_src_clear_tracks (src);
if (src->tags) { if (src->tags) {
gst_tag_list_free (src->tags); gst_tag_list_unref (src->tags);
src->tags = NULL; src->tags = NULL;
} }
......
...@@ -475,7 +475,7 @@ gst_audio_decoder_reset (GstAudioDecoder * dec, gboolean full) ...@@ -475,7 +475,7 @@ gst_audio_decoder_reset (GstAudioDecoder * dec, gboolean full)
dec->priv->ctx.max_errors = GST_AUDIO_DECODER_MAX_ERRORS; dec->priv->ctx.max_errors = GST_AUDIO_DECODER_MAX_ERRORS;
if (dec->priv->taglist) { if (dec->priv->taglist) {
gst_tag_list_free (dec->priv->taglist); gst_tag_list_unref (dec->priv->taglist);
dec->priv->taglist = NULL; dec->priv->taglist = NULL;
} }
dec->priv->taglist_changed = FALSE; dec->priv->taglist_changed = FALSE;
......
...@@ -466,7 +466,7 @@ gst_audio_encoder_reset (GstAudioEncoder * enc, gboolean full) ...@@ -466,7 +466,7 @@ gst_audio_encoder_reset (GstAudioEncoder * enc, gboolean full)
gst_audio_info_init (&enc->priv->ctx.info); gst_audio_info_init (&enc->priv->ctx.info);
if (enc->priv->tags) if (enc->priv->tags)
gst_tag_list_free (enc->priv->tags); gst_tag_list_unref (enc->priv->tags);
enc->priv->tags = NULL; enc->priv->tags = NULL;
enc->priv->tags_changed = FALSE; enc->priv->tags_changed = FALSE;
...@@ -1967,7 +1967,7 @@ gst_audio_encoder_activate (GstAudioEncoder * enc, gboolean active) ...@@ -1967,7 +1967,7 @@ gst_audio_encoder_activate (GstAudioEncoder * enc, gboolean active)
if (active) { if (active) {
if (enc->priv->tags) if (enc->priv->tags)
gst_tag_list_free (enc->priv->tags); gst_tag_list_unref (enc->priv->tags);
enc->priv->tags = gst_tag_list_new_empty (); enc->priv->tags = gst_tag_list_new_empty ();
enc->priv->tags_changed = FALSE; enc->priv->tags_changed = FALSE;
......
...@@ -65,7 +65,7 @@ gst_discoverer_stream_info_finalize (GObject * object) ...@@ -65,7 +65,7 @@ gst_discoverer_stream_info_finalize (GObject * object)
gst_caps_unref (info->caps); gst_caps_unref (info->caps);
if (info->tags) if (info->tags)
gst_tag_list_free (info->tags); gst_tag_list_unref (info->tags);
if (info->toc) if (info->toc)
gst_toc_unref (info->toc); gst_toc_unref (info->toc);
...@@ -366,7 +366,7 @@ gst_discoverer_info_finalize (GObject * object) ...@@ -366,7 +366,7 @@ gst_discoverer_info_finalize (GObject * object)
g_list_free (info->stream_list); g_list_free (info->stream_list);
if (info->tags) if (info->tags)
gst_tag_list_free (info->tags); gst_tag_list_unref (info->tags);
if (info->toc) if (info->toc)
gst_toc_unref (info->toc); gst_toc_unref (info->toc);
......
...@@ -478,7 +478,7 @@ _event_probe (GstPad * pad, GstPadProbeInfo * info, PrivateStream * ps) ...@@ -478,7 +478,7 @@ _event_probe (GstPad * pad, GstPadProbeInfo * info, PrivateStream * ps)
ps->tags); ps->tags);
tmp = gst_tag_list_merge (ps->tags, tl, GST_TAG_MERGE_APPEND); tmp = gst_tag_list_merge (ps->tags, tl, GST_TAG_MERGE_APPEND);
if (ps->tags) if (ps->tags)
gst_tag_list_free (ps->tags); gst_tag_list_unref (ps->tags);
ps->tags = tmp; ps->tags = tmp;
GST_DEBUG_OBJECT (pad, "private stream %p new tags %" GST_PTR_FORMAT, ps, GST_DEBUG_OBJECT (pad, "private stream %p new tags %" GST_PTR_FORMAT, ps,
tmp); tmp);
...@@ -680,7 +680,7 @@ uridecodebin_pad_removed_cb (GstElement * uridecodebin, GstPad * pad, ...@@ -680,7 +680,7 @@ uridecodebin_pad_removed_cb (GstElement * uridecodebin, GstPad * pad,
gst_bin_remove_many (dc->priv->pipeline, ps->sink, ps->queue, NULL); gst_bin_remove_many (dc->priv->pipeline, ps->sink, ps->queue, NULL);
if (ps->tags) { if (ps->tags) {
gst_tag_list_free (ps->tags); gst_tag_list_unref (ps->tags);
} }
if (ps->toc) { if (ps->toc) {
gst_toc_unref (ps->toc); gst_toc_unref (ps->toc);
...@@ -737,7 +737,7 @@ gst_discoverer_merge_and_replace_tags (GstTagList ** taglist, ...@@ -737,7 +737,7 @@ gst_discoverer_merge_and_replace_tags (GstTagList ** taglist,
} }
gst_tag_list_insert (*taglist, new_tags, GST_TAG_MERGE_REPLACE); gst_tag_list_insert (*taglist, new_tags, GST_TAG_MERGE_REPLACE);
gst_tag_list_free (new_tags); gst_tag_list_unref (new_tags);
} }
/* Parses a set of caps and tags in st and populates a GstDiscovererStreamInfo /* Parses a set of caps and tags in st and populates a GstDiscovererStreamInfo
...@@ -1112,9 +1112,9 @@ parse_stream_topology (GstDiscoverer * dc, const GstStructure * topology, ...@@ -1112,9 +1112,9 @@ parse_stream_topology (GstDiscoverer * dc, const GstStructure * topology,
tmp = tmp =
gst_tag_list_merge (cont->parent.tags, (GstTagList *) tags, gst_tag_list_merge (cont->parent.tags, (GstTagList *) tags,
GST_TAG_MERGE_APPEND); GST_TAG_MERGE_APPEND);
gst_tag_list_free (tags); gst_tag_list_unref (tags);
if (cont->parent.tags) if (cont->parent.tags)
gst_tag_list_free (cont->parent.tags); gst_tag_list_unref (cont->parent.tags);
cont->parent.tags = tmp; cont->parent.tags = tmp;
GST_DEBUG ("Container info tags %" GST_PTR_FORMAT, tmp); GST_DEBUG ("Container info tags %" GST_PTR_FORMAT, tmp);
} }
...@@ -1376,9 +1376,9 @@ handle_message (GstDiscoverer * dc, GstMessage * msg) ...@@ -1376,9 +1376,9 @@ handle_message (GstDiscoverer * dc, GstMessage * msg)
tmp = tmp =
gst_tag_list_merge (dc->priv->current_info->tags, tl, gst_tag_list_merge (dc->priv->current_info->tags, tl,
GST_TAG_MERGE_APPEND); GST_TAG_MERGE_APPEND);
gst_tag_list_free (tl); gst_tag_list_unref (tl);
if (dc->priv->current_info->tags) if (dc->priv->current_info->tags)
gst_tag_list_free (dc->priv->current_info->tags); gst_tag_list_unref (dc->priv->current_info->tags);
dc->priv->current_info->tags = tmp; dc->priv->current_info->tags = tmp;
GST_DEBUG_OBJECT (GST_MESSAGE_SRC (msg), "Current info %p, tags %" GST_DEBUG_OBJECT (GST_MESSAGE_SRC (msg), "Current info %p, tags %"
GST_PTR_FORMAT, dc->priv->current_info, tmp); GST_PTR_FORMAT, dc->priv->current_info, tmp);
......
...@@ -811,7 +811,7 @@ gst_riff_parse_info (GstElement * element, ...@@ -811,7 +811,7 @@ gst_riff_parse_info (GstElement * element,
*_taglist = taglist; *_taglist = taglist;
} else { } else {
*_taglist = NULL; *_taglist = NULL;
gst_tag_list_free (taglist); gst_tag_list_unref (taglist);
} }
gst_buffer_unmap (buf, &info); gst_buffer_unmap (buf, &info);
......
...@@ -515,7 +515,7 @@ gst_exif_reader_reset (GstExifReader * reader, gboolean return_taglist) ...@@ -515,7 +515,7 @@ gst_exif_reader_reset (GstExifReader * reader, gboolean return_taglist)
} }
if (reader->taglist) { if (reader->taglist) {
gst_tag_list_free (reader->taglist); gst_tag_list_unref (reader->taglist);
} }
return ret; return ret;
......
...@@ -267,11 +267,11 @@ gst_tag_demux_reset (GstTagDemux * tagdemux) ...@@ -267,11 +267,11 @@ gst_tag_demux_reset (GstTagDemux * tagdemux)
gst_caps_replace (caps_p, NULL); gst_caps_replace (caps_p, NULL);
if (tagdemux->priv->event_tags) { if (tagdemux->priv->event_tags) {
gst_tag_list_free (tagdemux->priv->event_tags); gst_tag_list_unref (tagdemux->priv->event_tags);
tagdemux->priv->event_tags = NULL; tagdemux->priv->event_tags = NULL;
} }
if (tagdemux->priv->parsed_tags) { if (tagdemux->priv->parsed_tags) {
gst_tag_list_free (tagdemux->priv->parsed_tags); gst_tag_list_unref (tagdemux->priv->parsed_tags);
tagdemux->priv->parsed_tags = NULL; tagdemux->priv->parsed_tags = NULL;
} }
...@@ -967,7 +967,7 @@ gst_tag_demux_pull_end_tag (GstTagDemux * demux, GstTagList ** tags) ...@@ -967,7 +967,7 @@ gst_tag_demux_pull_end_tag (GstTagDemux * demux, GstTagList ** tags)
done: done:
if (new_tags) if (new_tags)
gst_tag_list_free (new_tags); gst_tag_list_unref (new_tags);
if (buffer) if (buffer)
gst_buffer_unref (buffer); gst_buffer_unref (buffer);
return res; return res;
...@@ -1089,7 +1089,7 @@ gst_tag_demux_pull_start_tag (GstTagDemux * demux, GstTagList ** tags) ...@@ -1089,7 +1089,7 @@ gst_tag_demux_pull_start_tag (GstTagDemux * demux, GstTagList ** tags)
done: done:
if (new_tags) if (new_tags)
gst_tag_list_free (new_tags); gst_tag_list_unref (new_tags);
if (buffer) if (buffer)
gst_buffer_unref (buffer); gst_buffer_unref (buffer);
return res; return res;
...@@ -1138,9 +1138,9 @@ gst_tag_demux_element_find (GstTagDemux * demux) ...@@ -1138,9 +1138,9 @@ gst_tag_demux_element_find (GstTagDemux * demux)
} }
if (start_tags) if (start_tags)
gst_tag_list_free (start_tags); gst_tag_list_unref (start_tags);
if (end_tags) if (end_tags)
gst_tag_list_free (end_tags); gst_tag_list_unref (end_tags);
if (!e_tag_ok && !s_tag_ok) if (!e_tag_ok && !s_tag_ok)
goto no_tags; goto no_tags;
......
...@@ -125,12 +125,12 @@ gst_tag_mux_finalize (GObject * obj) ...@@ -125,12 +125,12 @@ gst_tag_mux_finalize (GObject * obj)
} }
if (mux->priv->event_tags) { if (mux->priv->event_tags) {
gst_tag_list_free (mux->priv->event_tags); gst_tag_list_unref (mux->priv->event_tags);
mux->priv->event_tags = NULL; mux->priv->event_tags = NULL;
} }
if (mux->priv->final_tags) { if (mux->priv->final_tags) {
gst_tag_list_free (mux->priv->final_tags); gst_tag_list_unref (mux->priv->final_tags);
mux->priv->final_tags = NULL; mux->priv->final_tags = NULL;
} }
...@@ -538,7 +538,7 @@ gst_tag_mux_change_state (GstElement * element, GstStateChange transition) ...@@ -538,7 +538,7 @@ gst_tag_mux_change_state (GstElement * element, GstStateChange transition)
mux->priv->newsegment_ev = NULL; mux->priv->newsegment_ev = NULL;
} }
if (mux->priv->event_tags) { if (mux->priv->event_tags) {
gst_tag_list_free (mux->priv->event_tags); gst_tag_list_unref (mux->priv->event_tags);
mux->priv->event_tags = NULL; mux->priv->event_tags = NULL;
} }
mux->priv->start_tag_size = 0; mux->priv->start_tag_size = 0;
......
...@@ -487,7 +487,7 @@ gst_tag_list_from_vorbiscomment (const guint8 * data, gsize size, ...@@ -487,7 +487,7 @@ gst_tag_list_from_vorbiscomment (const guint8 * data, gsize size,
return list; return list;
error: error:
gst_tag_list_free (list); gst_tag_list_unref (list);
return NULL; return NULL;
#undef ADVANCE #undef ADVANCE
} }
......
...@@ -592,7 +592,7 @@ id3v2_frames_to_tag_list (ID3TagsWorking * work, guint size) ...@@ -592,7 +592,7 @@ id3v2_frames_to_tag_list (ID3TagsWorking * work, guint size)
if (gst_tag_list_n_tags (work->tags) == 0) { if (gst_tag_list_n_tags (work->tags) == 0) {
GST_DEBUG ("Could not extract any frames from tag. Broken or empty tag"); GST_DEBUG ("Could not extract any frames from tag. Broken or empty tag");
gst_tag_list_free (work->tags); gst_tag_list_unref (work->tags);
work->tags = NULL; work->tags = NULL;
return FALSE; return FALSE;
} }
......
...@@ -1133,7 +1133,7 @@ gst_audio_test_src_fill (GstBaseSrc * basesrc, guint64 offset, ...@@ -1133,7 +1133,7 @@ gst_audio_test_src_fill (GstBaseSrc * basesrc, guint64 offset,
eclass->send_event (GST_ELEMENT_CAST (basesrc), eclass->send_event (GST_ELEMENT_CAST (basesrc),
gst_event_new_tag (taglist)); gst_event_new_tag (taglist));
else else
gst_tag_list_free (taglist); gst_tag_list_unref (taglist);
src->tags_pushed = TRUE; src->tags_pushed = TRUE;
} }
......
...@@ -145,7 +145,7 @@ GST_START_TEST (test_identification_header) ...@@ -145,7 +145,7 @@ GST_START_TEST (test_identification_header)
fail_unless_equals_string (artist, "me"); fail_unless_equals_string (artist, "me");
g_free (artist); g_free (artist);
fail_unless_equals_int (gst_tag_list_get_tag_size (tag_list, "album"), 0); fail_unless_equals_int (gst_tag_list_get_tag_size (tag_list, "album"), 0);
gst_tag_list_free (tag_list); gst_tag_list_unref (tag_list);
gst_message_unref (message); gst_message_unref (message);
#endif #endif
......
...@@ -242,7 +242,7 @@ GST_START_TEST (test_empty_tags_set) ...@@ -242,7 +242,7 @@ GST_START_TEST (test_empty_tags_set)
GST_TAG_MERGE_REPLACE); GST_TAG_MERGE_REPLACE);
gst_tag_setter_set_tag_merge_mode (GST_TAG_SETTER (vorbistag), gst_tag_setter_set_tag_merge_mode (GST_TAG_SETTER (vorbistag),
GST_TAG_MERGE_KEEP_ALL); GST_TAG_MERGE_KEEP_ALL);
gst_tag_list_free (tags); gst_tag_list_unref (tags);
start_pipeline (vorbistag); start_pipeline (vorbistag);
...@@ -297,7 +297,7 @@ GST_START_TEST (test_filled_tags_unset) ...@@ -297,7 +297,7 @@ GST_START_TEST (test_filled_tags_unset)
GST_TAG_MERGE_REPLACE); GST_TAG_MERGE_REPLACE);
gst_tag_setter_set_tag_merge_mode (GST_TAG_SETTER (vorbistag), gst_tag_setter_set_tag_merge_mode (GST_TAG_SETTER (vorbistag),
GST_TAG_MERGE_KEEP_ALL); GST_TAG_MERGE_KEEP_ALL);
gst_tag_list_free (tags); gst_tag_list_unref (tags);
start_pipeline (vorbistag); start_pipeline (vorbistag);
...@@ -353,7 +353,7 @@ GST_START_TEST (test_filled_tags_change) ...@@ -353,7 +353,7 @@ GST_START_TEST (test_filled_tags_change)
GST_TAG_MERGE_REPLACE); GST_TAG_MERGE_REPLACE);
gst_tag_setter_set_tag_merge_mode (GST_TAG_SETTER (vorbistag), gst_tag_setter_set_tag_merge_mode (GST_TAG_SETTER (vorbistag),
GST_TAG_MERGE_KEEP_ALL); GST_TAG_MERGE_KEEP_ALL);
gst_tag_list_free (tags); gst_tag_list_unref (tags);
start_pipeline (vorbistag); start_pipeline (vorbistag);
......
...@@ -345,7 +345,7 @@ GST_START_TEST (test_discid_calculations) ...@@ -345,7 +345,7 @@ GST_START_TEST (test_discid_calculations)
fail_unless (tag_list_has_tag (tags, "musicbrainz-discid", G_TYPE_STRING)); fail_unless (tag_list_has_tag (tags, "musicbrainz-discid", G_TYPE_STRING));
fail_unless (tag_list_has_tag (tags, "musicbrainz-discid-full", fail_unless (tag_list_has_tag (tags, "musicbrainz-discid-full",
G_TYPE_STRING)); G_TYPE_STRING));
gst_tag_list_free (tags); gst_tag_list_unref (tags);
gst_message_unref (msg); gst_message_unref (msg);
msg = msg =
......
...@@ -447,7 +447,7 @@ GST_START_TEST (test_pb_utils_taglist_add_codec_info) ...@@ -447,7 +447,7 @@ GST_START_TEST (test_pb_utils_taglist_add_codec_info)
fail_unless (gst_pb_utils_add_codec_description_to_tag_list (list, fail_unless (gst_pb_utils_add_codec_description_to_tag_list (list,
GST_TAG_VIDEO_CODEC, caps)); GST_TAG_VIDEO_CODEC, caps));
fail_if (gst_tag_list_is_empty (list)); fail_if (gst_tag_list_is_empty (list));
gst_tag_list_free (list); gst_tag_list_unref (list);
gst_caps_unref (caps); gst_caps_unref (caps);
} }
......
...@@ -204,7 +204,7 @@ GST_START_TEST (test_musicbrainz_tag_registration) ...@@ -204,7 +204,7 @@ GST_START_TEST (test_musicbrainz_tag_registration)
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_MUSICBRAINZ_TRMID, "5678901"); ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_MUSICBRAINZ_TRMID, "5678901");
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_ARTIST_SORTNAME, "Five, 678901"); ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_ARTIST_SORTNAME, "Five, 678901");
gst_tag_list_free (list); gst_tag_list_unref (list);
} }
GST_END_TEST; GST_END_TEST;
...@@ -342,45 +342,45 @@ GST_START_TEST (test_vorbis_tags) ...@@ -342,45 +342,45 @@ GST_START_TEST (test_vorbis_tags)
GST_LOG ("even_newer_list = %" GST_PTR_FORMAT, even_newer_list); GST_LOG ("even_newer_list = %" GST_PTR_FORMAT, even_newer_list);
fail_unless (gst_tag_list_is_equal (new_list, even_newer_list)); fail_unless (gst_tag_list_is_equal (new_list, even_newer_list));
gst_tag_list_free (new_list); gst_tag_list_unref (new_list);
gst_tag_list_free (even_newer_list); gst_tag_list_unref (even_newer_list);
gst_buffer_unref (buf); gst_buffer_unref (buf);
gst_buffer_unref (buf2); gst_buffer_unref (buf2);
} }
/* there can only be one language per taglist ... */ /* there can only be one language per taglist ... */
gst_tag_list_free (list); gst_tag_list_unref (list);
list = gst_tag_list_new_empty (); list = gst_tag_list_new_empty ();
gst_vorbis_tag_add (list, "LANGUAGE", "fr"); gst_vorbis_tag_add (list, "LANGUAGE", "fr");
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "fr"); ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "fr");
gst_tag_list_free (list); gst_tag_list_unref (list);
list = gst_tag_list_new_empty (); list = gst_tag_list_new_empty ();
gst_vorbis_tag_add (list, "LANGUAGE", "[fr]"); gst_vorbis_tag_add (list, "LANGUAGE", "[fr]");
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "fr"); ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "fr");
gst_tag_list_free (list); gst_tag_list_unref (list);
list = gst_tag_list_new_empty (); list = gst_tag_list_new_empty ();
gst_vorbis_tag_add (list, "LANGUAGE", "French [fr]"); gst_vorbis_tag_add (list, "LANGUAGE", "French [fr]");
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "fr"); ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "fr");
gst_tag_list_free (list); gst_tag_list_unref (list);
list = gst_tag_list_new_empty (); list = gst_tag_list_new_empty ();
gst_vorbis_tag_add (list, "LANGUAGE", "[eng] English"); gst_vorbis_tag_add (list, "LANGUAGE", "[eng] English");
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "eng"); ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "eng");
gst_tag_list_free (list); gst_tag_list_unref (list);
list = gst_tag_list_new_empty (); list = gst_tag_list_new_empty ();
gst_vorbis_tag_add (list, "LANGUAGE", "eng"); gst_vorbis_tag_add (list, "LANGUAGE", "eng");
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "eng"); ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "eng");
gst_tag_list_free (list); gst_tag_list_unref (list);
list = gst_tag_list_new_empty (); list = gst_tag_list_new_empty ();
gst_vorbis_tag_add (list, "LANGUAGE", "[eng]"); gst_vorbis_tag_add (list, "LANGUAGE", "[eng]");
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "eng"); ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "eng");
/* free-form *sigh* */ /* free-form *sigh* */
gst_tag_list_free (list); gst_tag_list_unref (list);
list = gst_tag_list_new_empty (); list = gst_tag_list_new_empty ();
gst_vorbis_tag_add (list, "LANGUAGE", "English"); gst_vorbis_tag_add (list, "LANGUAGE", "English");
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "English"); ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "English");
...@@ -412,7 +412,7 @@ GST_START_TEST (test_vorbis_tags) ...@@ -412,7 +412,7 @@ GST_START_TEST (test_vorbis_tags)
gst_buffer_unref (buf2); gst_buffer_unref (buf2);
} }
gst_tag_list_free (list); gst_tag_list_unref (list);
/* make sure gst_tag_list_from_vorbiscomment_buffer() works with an /* make sure gst_tag_list_from_vorbiscomment_buffer() works with an
* empty ID (for Speex) */ * empty ID (for Speex) */
...@@ -448,13 +448,13 @@ GST_START_TEST (test_vorbis_tags) ...@@ -448,13 +448,13 @@ GST_START_TEST (test_vorbis_tags)
fail_unless (list != NULL); fail_unless (list != NULL);
fail_unless (gst_tag_list_n_tags (list) == 0); fail_unless (gst_tag_list_n_tags (list) == 0);
g_free (vendor); g_free (vendor);
gst_tag_list_free (list); gst_tag_list_unref (list);
/* now again without vendor */ /* now again without vendor */
list = gst_tag_list_from_vorbiscomment_buffer (buf, NULL, 0, NULL); list = gst_tag_list_from_vorbiscomment_buffer (buf, NULL, 0, NULL);
fail_unless (list != NULL); fail_unless (list != NULL);
fail_unless (gst_tag_list_n_tags (list) == 0); fail_unless (gst_tag_list_n_tags (list) == 0);
gst_tag_list_free (list); gst_tag_list_unref (list);
gst_buffer_unref (buf); gst_buffer_unref (buf);
} }
...@@ -496,7 +496,7 @@ GST_START_TEST (test_vorbis_tags) ...@@ -496,7 +496,7 @@ GST_START_TEST (test_vorbis_tags)
fail_unless (gst_tag_list_n_tags (list) == 1); fail_unless (gst_tag_list_n_tags (list) == 1);
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_ARTIST, "foo bar"); ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_ARTIST, "foo bar");
g_free (vendor); g_free (vendor);
gst_tag_list_free (list); gst_tag_list_unref (list);
/* now again without vendor */ /* now again without vendor */
list = gst_tag_list_from_vorbiscomment_buffer (buf, list = gst_tag_list_from_vorbiscomment_buffer (buf,
...@@ -504,7 +504,7 @@ GST_START_TEST (test_vorbis_tags) ...@@ -504,7 +504,7 @@ GST_START_TEST (test_vorbis_tags)
</