}
if (pad->map.taglist) {
- gst_tag_list_free (pad->map.taglist);
+ gst_tag_list_unref (pad->map.taglist);
pad->map.taglist = NULL;
}
list = gst_tag_list_new_empty ();
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_SERIAL, serialno,
NULL);
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
GST_DEBUG_OBJECT (chain->ogg,
"created new ogg src %p for stream with serial %08x", ret, serialno);
gst_event_parse_tag (event, &tags);
tags = gst_tag_list_merge (ogg_pad->tags, tags, GST_TAG_MERGE_APPEND);
if (ogg_pad->tags)
- gst_tag_list_free (ogg_pad->tags);
+ gst_tag_list_unref (ogg_pad->tags);
ogg_pad->tags = tags;
GST_DEBUG_OBJECT (ogg_mux, "Got tags %" GST_PTR_FORMAT, ogg_pad->tags);
}
if (oggpad->tags) {
- gst_tag_list_free (oggpad->tags);
+ gst_tag_list_unref (oggpad->tags);
oggpad->tags = NULL;
}
exit:
if (*tags)
- gst_tag_list_free (*tags);
+ gst_tag_list_unref (*tags);
*tags = list;
return ret;
/* ensure the comment packet cannot override the category/language
from the identification header */
gst_tag_list_insert (pad->taglist, list, GST_TAG_MERGE_KEEP_ALL);
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
} else
pad->taglist = list;
}
gst_audio_decoder_merge_tags (GST_AUDIO_DECODER_CAST (vd), list,
GST_TAG_MERGE_REPLACE);
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
return GST_FLOW_OK;
}
vorbis_info_clear (&vorbisenc->vi);
g_free (vorbisenc->last_message);
vorbisenc->last_message = NULL;
- gst_tag_list_free (vorbisenc->tags);
+ gst_tag_list_unref (vorbisenc->tags);
vorbisenc->tags = NULL;
gst_tag_setter_reset_tags (GST_TAG_SETTER (enc));
if (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_free (merged_tags);
+ gst_tag_list_unref (merged_tags);
}
}
/* build new tag list */
new_tags = gst_tag_list_merge (user_tags, old_tags,
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 =
gst_tag_list_to_vorbiscomment_buffer (new_tags, (guint8 *) "\003vorbis",
7, encoder);
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);
gst_buffer_unref (buffer);
for (i = 0; i < src->priv->num_all_tracks; ++i) {
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);
gst_audio_cd_src_clear_tracks (src);
if (src->tags) {
- gst_tag_list_free (src->tags);
+ gst_tag_list_unref (src->tags);
src->tags = NULL;
}
dec->priv->ctx.max_errors = GST_AUDIO_DECODER_MAX_ERRORS;
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_changed = FALSE;
gst_audio_info_init (&enc->priv->ctx.info);
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_changed = FALSE;
if (active) {
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_changed = FALSE;
gst_caps_unref (info->caps);
if (info->tags)
- gst_tag_list_free (info->tags);
+ gst_tag_list_unref (info->tags);
if (info->toc)
gst_toc_unref (info->toc);
g_list_free (info->stream_list);
if (info->tags)
- gst_tag_list_free (info->tags);
+ gst_tag_list_unref (info->tags);
if (info->toc)
gst_toc_unref (info->toc);
ps->tags);
tmp = gst_tag_list_merge (ps->tags, tl, GST_TAG_MERGE_APPEND);
if (ps->tags)
- gst_tag_list_free (ps->tags);
+ gst_tag_list_unref (ps->tags);
ps->tags = tmp;
GST_DEBUG_OBJECT (pad, "private stream %p new tags %" GST_PTR_FORMAT, ps,
tmp);
gst_bin_remove_many (dc->priv->pipeline, ps->sink, ps->queue, NULL);
if (ps->tags) {
- gst_tag_list_free (ps->tags);
+ gst_tag_list_unref (ps->tags);
}
if (ps->toc) {
gst_toc_unref (ps->toc);
}
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
tmp =
gst_tag_list_merge (cont->parent.tags, (GstTagList *) tags,
GST_TAG_MERGE_APPEND);
- gst_tag_list_free (tags);
+ gst_tag_list_unref (tags);
if (cont->parent.tags)
- gst_tag_list_free (cont->parent.tags);
+ gst_tag_list_unref (cont->parent.tags);
cont->parent.tags = tmp;
GST_DEBUG ("Container info tags %" GST_PTR_FORMAT, tmp);
}
tmp =
gst_tag_list_merge (dc->priv->current_info->tags, tl,
GST_TAG_MERGE_APPEND);
- gst_tag_list_free (tl);
+ gst_tag_list_unref (tl);
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;
GST_DEBUG_OBJECT (GST_MESSAGE_SRC (msg), "Current info %p, tags %"
GST_PTR_FORMAT, dc->priv->current_info, tmp);
*_taglist = taglist;
} else {
*_taglist = NULL;
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
}
gst_buffer_unmap (buf, &info);
}
if (reader->taglist) {
- gst_tag_list_free (reader->taglist);
+ gst_tag_list_unref (reader->taglist);
}
return ret;
gst_caps_replace (caps_p, NULL);
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;
}
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;
}
done:
if (new_tags)
- gst_tag_list_free (new_tags);
+ gst_tag_list_unref (new_tags);
if (buffer)
gst_buffer_unref (buffer);
return res;
done:
if (new_tags)
- gst_tag_list_free (new_tags);
+ gst_tag_list_unref (new_tags);
if (buffer)
gst_buffer_unref (buffer);
return res;
}
if (start_tags)
- gst_tag_list_free (start_tags);
+ gst_tag_list_unref (start_tags);
if (end_tags)
- gst_tag_list_free (end_tags);
+ gst_tag_list_unref (end_tags);
if (!e_tag_ok && !s_tag_ok)
goto no_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;
}
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->newsegment_ev = NULL;
}
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->start_tag_size = 0;
return list;
error:
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
return NULL;
#undef ADVANCE
}
if (gst_tag_list_n_tags (work->tags) == 0) {
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;
return FALSE;
}
eclass->send_event (GST_ELEMENT_CAST (basesrc),
gst_event_new_tag (taglist));
else
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
src->tags_pushed = TRUE;
}
fail_unless_equals_string (artist, "me");
g_free (artist);
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);
#endif
GST_TAG_MERGE_REPLACE);
gst_tag_setter_set_tag_merge_mode (GST_TAG_SETTER (vorbistag),
GST_TAG_MERGE_KEEP_ALL);
- gst_tag_list_free (tags);
+ gst_tag_list_unref (tags);
start_pipeline (vorbistag);
GST_TAG_MERGE_REPLACE);
gst_tag_setter_set_tag_merge_mode (GST_TAG_SETTER (vorbistag),
GST_TAG_MERGE_KEEP_ALL);
- gst_tag_list_free (tags);
+ gst_tag_list_unref (tags);
start_pipeline (vorbistag);
GST_TAG_MERGE_REPLACE);
gst_tag_setter_set_tag_merge_mode (GST_TAG_SETTER (vorbistag),
GST_TAG_MERGE_KEEP_ALL);
- gst_tag_list_free (tags);
+ gst_tag_list_unref (tags);
start_pipeline (vorbistag);
fail_unless (tag_list_has_tag (tags, "musicbrainz-discid", G_TYPE_STRING));
fail_unless (tag_list_has_tag (tags, "musicbrainz-discid-full",
G_TYPE_STRING));
- gst_tag_list_free (tags);
+ gst_tag_list_unref (tags);
gst_message_unref (msg);
msg =
fail_unless (gst_pb_utils_add_codec_description_to_tag_list (list,
GST_TAG_VIDEO_CODEC, caps));
fail_if (gst_tag_list_is_empty (list));
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
gst_caps_unref (caps);
}
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_MUSICBRAINZ_TRMID, "5678901");
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_LOG ("even_newer_list = %" GST_PTR_FORMAT, even_newer_list);
fail_unless (gst_tag_list_is_equal (new_list, even_newer_list));
- gst_tag_list_free (new_list);
- gst_tag_list_free (even_newer_list);
+ gst_tag_list_unref (new_list);
+ gst_tag_list_unref (even_newer_list);
gst_buffer_unref (buf);
gst_buffer_unref (buf2);
}
/* there can only be one language per taglist ... */
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
list = gst_tag_list_new_empty ();
gst_vorbis_tag_add (list, "LANGUAGE", "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 ();
gst_vorbis_tag_add (list, "LANGUAGE", "[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 ();
gst_vorbis_tag_add (list, "LANGUAGE", "French [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 ();
gst_vorbis_tag_add (list, "LANGUAGE", "[eng] English");
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 ();
gst_vorbis_tag_add (list, "LANGUAGE", "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 ();
gst_vorbis_tag_add (list, "LANGUAGE", "[eng]");
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "eng");
/* free-form *sigh* */
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
list = gst_tag_list_new_empty ();
gst_vorbis_tag_add (list, "LANGUAGE", "English");
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_LANGUAGE_CODE, "English");
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
* empty ID (for Speex) */
fail_unless (list != NULL);
fail_unless (gst_tag_list_n_tags (list) == 0);
g_free (vendor);
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
/* now again without vendor */
list = gst_tag_list_from_vorbiscomment_buffer (buf, NULL, 0, NULL);
fail_unless (list != NULL);
fail_unless (gst_tag_list_n_tags (list) == 0);
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
gst_buffer_unref (buf);
}
fail_unless (gst_tag_list_n_tags (list) == 1);
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_ARTIST, "foo bar");
g_free (vendor);
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
/* now again without vendor */
list = gst_tag_list_from_vorbiscomment_buffer (buf,
fail_unless (list != NULL);
fail_unless (gst_tag_list_n_tags (list) == 1);
ASSERT_TAG_LIST_HAS_STRING (list, GST_TAG_ARTIST, "foo bar");
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
gst_buffer_unref (buf);
}
fail_unless (gst_date_time_has_time (dt));
gst_date_time_unref (dt);
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
}
/* check date with month/day of 00-00 */
fail_unless (!gst_date_time_has_time (dt));
gst_date_time_unref (dt);
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
}
/* check date with valid month, but day of 00 */
fail_unless (!gst_date_time_has_time (dt));
gst_date_time_unref (dt);
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
}
}
gst_date_time_unref (dt);
dt = NULL;
- gst_tag_list_free (tags);
+ gst_tag_list_unref (tags);
g_unsetenv ("GST_ID3V1_TAG_ENCODING");
}
gst_buffer_unmap (buf, &map);
gst_buffer_unref (buf);
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
}
GST_END_TEST;
}
}
if (list)
- gst_tag_list_free (list);
+ gst_tag_list_unref (list);
gst_buffer_unref (buf);
g_free (text);
fail_unless (gst_tag_list_is_equal (taglist, taglist2));
gst_buffer_unref (buf);
- gst_tag_list_free (taglist2);
+ gst_tag_list_unref (taglist2);
}
static void
gst_tag_list_add_value (taglist, GST_TAG_MERGE_REPLACE, gsttag, value);
do_xmp_tag_serialization_deserialization (taglist, NULL);
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
}
GST_START_TEST (test_xmp_tags_serialization_deserialization)
GST_TAG_KEYWORDS, "k2", GST_TAG_TITLE, "title", GST_TAG_KEYWORDS, "k3",
NULL);
do_xmp_tag_serialization_deserialization (taglist, NULL);
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
taglist = gst_tag_list_new_empty ();
gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND, GST_TAG_GEO_LOCATION_COUNTRY,
"Brazil", GST_TAG_GEO_LOCATION_CITY, "Campina Grande", NULL);
do_xmp_tag_serialization_deserialization (taglist, schemas);
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
}
GST_END_TEST;
gst_tag_list_peek_string_index (taglist, GST_TAG_COPYRIGHT, 0, &str);
fail_unless_equals_string (str, "my copyright");
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
gst_buffer_unref (buf);
}
gst_buffer_unref (buf);
fail_unless (gst_tag_list_is_equal (taglist, taglist2));
- gst_tag_list_free (taglist2);
+ gst_tag_list_unref (taglist2);
/* BE */
buf = gst_tag_list_to_exif_buffer (taglist, G_BIG_ENDIAN, 0);
gst_buffer_unref (buf);
fail_unless (gst_tag_list_is_equal (taglist, taglist2));
- gst_tag_list_free (taglist2);
+ gst_tag_list_unref (taglist2);
/* APP1 */
buf = gst_tag_list_to_exif_buffer_with_tiff_header (taglist);
gst_buffer_unref (buf);
fail_unless (gst_tag_list_is_equal (taglist, taglist2));
- gst_tag_list_free (taglist2);
+ gst_tag_list_unref (taglist2);
}
static void
gst_tag_list_add_value (taglist, GST_TAG_MERGE_REPLACE, gsttag, value);
do_exif_tag_serialization_deserialization (taglist);
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
}
/*
do_exif_tag_serialization_deserialization (taglist);
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
}
GST_END_TEST;
taglist = gst_tag_list_new (GST_TAG_CAPTURING_FLASH_FIRED, FALSE,
GST_TAG_CAPTURING_FLASH_MODE, "auto", NULL);
do_exif_tag_serialization_deserialization (taglist);
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
taglist = gst_tag_list_new (GST_TAG_CAPTURING_FLASH_FIRED, TRUE,
GST_TAG_CAPTURING_FLASH_MODE, "auto", NULL);
do_exif_tag_serialization_deserialization (taglist);
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
taglist = gst_tag_list_new (GST_TAG_CAPTURING_FLASH_FIRED, FALSE,
GST_TAG_CAPTURING_FLASH_MODE, "never", NULL);
do_exif_tag_serialization_deserialization (taglist);
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
taglist = gst_tag_list_new (GST_TAG_CAPTURING_FLASH_FIRED, TRUE,
GST_TAG_CAPTURING_FLASH_MODE, "always", NULL);
do_exif_tag_serialization_deserialization (taglist);
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
}
GST_END_TEST;
(test_element), taglist, TRUE) == NULL);
gst_object_unref (test_element);
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
}
GST_END_TEST;
gst_object_unref (test_element);
gst_buffer_unref (buf);
gst_buffer_unref (buf2);
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
}
GST_END_TEST;
(test_element), taglist, TRUE);
taglist2 = gst_tag_list_from_xmp_buffer (buf);
fail_unless (gst_tag_list_is_equal (taglist, taglist2));
- gst_tag_list_free (taglist2);
+ gst_tag_list_unref (taglist2);
gst_buffer_unref (buf);
gst_tag_xmp_writer_remove_schema (GST_TAG_XMP_WRITER (test_element), "xap");
fail_unless (gst_tag_list_get_value_index (taglist2, GST_TAG_USER_RATING,
0) == NULL);
- gst_tag_list_free (taglist2);
+ gst_tag_list_unref (taglist2);
gst_buffer_unref (buf);
gst_object_unref (test_element);
- gst_tag_list_free (taglist);
+ gst_tag_list_unref (taglist);
}
GST_END_TEST;