gst_tag_list_free -> gst_tag_list_unref

This commit is contained in:
Tim-Philipp Müller 2012-08-04 16:10:16 +01:00
parent a549b0bf2c
commit c074bfd0b9
25 changed files with 107 additions and 107 deletions

View file

@ -425,7 +425,7 @@ gst_flac_enc_stop (GstAudioEncoder * enc)
GstFlacEnc *flacenc = GST_FLAC_ENC (enc);
GST_DEBUG_OBJECT (enc, "stop");
gst_tag_list_free (flacenc->tags);
gst_tag_list_unref (flacenc->tags);
flacenc->tags = NULL;
if (FLAC__stream_encoder_get_state (flacenc->encoder) !=
FLAC__STREAM_ENCODER_UNINITIALIZED) {
@ -594,7 +594,7 @@ gst_flac_enc_set_metadata (GstFlacEnc * flacenc, guint64 total_samples)
flacenc->meta, entries) != true)
g_warning ("Dude, i'm already initialized!");
gst_tag_list_free (copy);
gst_tag_list_unref (copy);
}
static GstCaps *

View file

@ -142,7 +142,7 @@ gst_flac_tag_dispose (GObject * object)
tag->vorbiscomment = NULL;
}
if (tag->tags) {
gst_tag_list_free (tag->tags);
gst_tag_list_unref (tag->tags);
tag->tags = NULL;
}
@ -377,7 +377,7 @@ gst_flac_tag_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
buffer = gst_tag_list_to_vorbiscomment_buffer (merged_tags, header,
sizeof (header), NULL);
GST_DEBUG_OBJECT (tag, "Writing tags %" GST_PTR_FORMAT, merged_tags);
gst_tag_list_free (merged_tags);
gst_tag_list_unref (merged_tags);
if (buffer == NULL)
goto no_comment;
@ -483,7 +483,7 @@ gst_flac_tag_change_state (GstElement * element, GstStateChange transition)
tag->vorbiscomment = NULL;
}
if (tag->tags) {
gst_tag_list_free (tag->tags);
gst_tag_list_unref (tag->tags);
tag->tags = NULL;
}
tag->metadata_block_size = 0;

View file

@ -259,7 +259,7 @@ gst_shout2send_finalize (GstShout2send * shout2send)
g_free (shout2send->mount);
g_free (shout2send->url);
gst_tag_list_free (shout2send->tags);
gst_tag_list_unref (shout2send->tags);
gst_poll_free (shout2send->timer);
@ -348,7 +348,7 @@ gst_shout2send_set_metadata (GstShout2send * shout2send)
shout_metadata_free (pmetadata);
}
gst_tag_list_free (copy);
gst_tag_list_unref (copy);
}
#endif

View file

@ -790,7 +790,7 @@ gst_soup_http_src_got_headers_cb (SoupMessage * msg, GstSoupHTTPSrc * src)
"calling gst_element_found_tags with %" GST_PTR_FORMAT, tag_list);
gst_pad_push_event (GST_BASE_SRC_PAD (src), gst_event_new_tag (tag_list));
} else {
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
}
/* Handle HTTP errors. */

View file

@ -312,7 +312,7 @@ gst_speex_dec_parse_comments (GstSpeexDec * dec, GstBuffer * buf)
gst_audio_decoder_merge_tags (GST_AUDIO_DECODER (dec), list,
GST_TAG_MERGE_REPLACE);
gst_tag_list_free (list);
gst_tag_list_unref (list);
g_free (encoder);
g_free (ver);

View file

@ -269,7 +269,7 @@ gst_speex_enc_stop (GstAudioEncoder * benc)
enc->state = NULL;
}
speex_bits_destroy (&enc->bits);
gst_tag_list_free (enc->tags);
gst_tag_list_unref (enc->tags);
enc->tags = NULL;
gst_tag_setter_reset_tags (GST_TAG_SETTER (enc));
@ -350,7 +350,7 @@ gst_speex_enc_create_metadata_buffer (GstSpeexEnc * enc)
GST_DEBUG_OBJECT (enc, "merged tags = %" GST_PTR_FORMAT, merged_tags);
comments = gst_tag_list_to_vorbiscomment_buffer (merged_tags, NULL,
0, "Encoded with GStreamer Speexenc");
gst_tag_list_free (merged_tags);
gst_tag_list_unref (merged_tags);
GST_BUFFER_OFFSET (comments) = 0;
GST_BUFFER_OFFSET_END (comments) = 0;

View file

@ -292,7 +292,7 @@ gst_flac_parse_finalize (GObject * object)
GstFlacParse *flacparse = GST_FLAC_PARSE (object);
if (flacparse->tags) {
gst_tag_list_free (flacparse->tags);
gst_tag_list_unref (flacparse->tags);
flacparse->tags = NULL;
}
if (flacparse->toc) {
@ -347,7 +347,7 @@ gst_flac_parse_stop (GstBaseParse * parse)
GstFlacParse *flacparse = GST_FLAC_PARSE (parse);
if (flacparse->tags) {
gst_tag_list_free (flacparse->tags);
gst_tag_list_unref (flacparse->tags);
flacparse->tags = NULL;
}
if (flacparse->toc) {
@ -970,7 +970,7 @@ gst_flac_parse_handle_vorbiscomment (GstFlacParse * flacparse,
if (flacparse->tags == NULL) {
GST_ERROR_OBJECT (flacparse, "Invalid vorbiscomment block");
} else if (gst_tag_list_is_empty (flacparse->tags)) {
gst_tag_list_free (flacparse->tags);
gst_tag_list_unref (flacparse->tags);
flacparse->tags = NULL;
}
@ -1125,7 +1125,7 @@ gst_flac_parse_handle_picture (GstFlacParse * flacparse, GstBuffer * buffer)
map.data + gst_byte_reader_get_pos (&reader), img_len, img_type);
if (gst_tag_list_is_empty (flacparse->tags)) {
gst_tag_list_free (flacparse->tags);
gst_tag_list_unref (flacparse->tags);
flacparse->tags = NULL;
}
@ -1422,7 +1422,7 @@ gst_flac_parse_generate_headers (GstFlacParse * flacparse)
vorbiscomment =
gst_tag_list_to_vorbiscomment_buffer (taglist, header,
sizeof (header), NULL);
gst_tag_list_free (taglist);
gst_tag_list_unref (taglist);
gst_buffer_map (vorbiscomment, &map, GST_MAP_WRITE);

View file

@ -231,7 +231,7 @@ gst_avi_demux_reset_stream (GstAviDemux * avi, GstAviStream * stream)
gst_object_unref (stream->pad);
}
if (stream->taglist) {
gst_tag_list_free (stream->taglist);
gst_tag_list_unref (stream->taglist);
stream->taglist = NULL;
}
memset (stream, 0, sizeof (GstAviStream));
@ -278,7 +278,7 @@ gst_avi_demux_reset (GstAviDemux * avi)
}
if (avi->globaltags)
gst_tag_list_free (avi->globaltags);
gst_tag_list_unref (avi->globaltags);
avi->globaltags = NULL;
avi->got_tags = TRUE; /* we always want to push global tags */

View file

@ -354,7 +354,7 @@ gst_avi_mux_reset (GstAviMux * avimux)
avimux->codec_data_size = 0;
if (avimux->tags_snap) {
gst_tag_list_free (avimux->tags_snap);
gst_tag_list_unref (avimux->tags_snap);
avimux->tags_snap = NULL;
}

View file

@ -82,7 +82,7 @@ gst_tag_inject_finalize (GObject * object)
GstTagInject *self = GST_TAG_INJECT (object);
if (self->tags) {
gst_tag_list_free (self->tags);
gst_tag_list_unref (self->tags);
self->tags = NULL;
}

View file

@ -3240,7 +3240,7 @@ gst_flv_demux_dispose (GObject * object)
}
if (demux->taglist) {
gst_tag_list_free (demux->taglist);
gst_tag_list_unref (demux->taglist);
demux->taglist = NULL;
}

View file

@ -131,7 +131,7 @@ gst_icydemux_reset (GstICYDemux * icydemux)
gst_icydemux_remove_srcpad (icydemux);
if (icydemux->cached_tags) {
gst_tag_list_free (icydemux->cached_tags);
gst_tag_list_unref (icydemux->cached_tags);
icydemux->cached_tags = NULL;
}
@ -287,7 +287,7 @@ gst_icydemux_tag_found (GstICYDemux * icydemux, GstTagList * tags)
} else {
gst_tag_list_insert (icydemux->cached_tags, tags,
GST_TAG_MERGE_REPLACE_ALL);
gst_tag_list_free (tags);
gst_tag_list_unref (tags);
}
return TRUE;
@ -341,7 +341,7 @@ gst_icydemux_parse_and_send_tags (GstICYDemux * icydemux)
if (!gst_tag_list_is_empty (tags))
gst_icydemux_tag_found (icydemux, tags);
else
gst_tag_list_free (tags);
gst_tag_list_unref (tags);
}
static gboolean

View file

@ -1174,7 +1174,7 @@ gst_qt_mux_setup_metadata (GstQTMux * qtmux)
GST_DEBUG_OBJECT (qtmux, "Formatting tags");
gst_qt_mux_add_metadata_tags (qtmux, copy);
gst_qt_mux_add_xmp_tags (qtmux, copy);
gst_tag_list_free (copy);
gst_tag_list_unref (copy);
} else {
GST_DEBUG_OBJECT (qtmux, "No tags received");
}

View file

@ -1808,7 +1808,7 @@ gst_qtdemux_stream_free (GstQTDemux * qtdemux, QtDemuxStream * stream)
gst_caps_unref (stream->caps);
g_free (stream->segments);
if (stream->pending_tags)
gst_tag_list_free (stream->pending_tags);
gst_tag_list_unref (stream->pending_tags);
g_free (stream->redirect_uri);
/* free stbl sub-atoms */
gst_qtdemux_stbl_free (stream);
@ -1851,7 +1851,7 @@ gst_qtdemux_change_state (GstElement * element, GstStateChange transition)
gst_buffer_unref (qtdemux->comp_brands);
qtdemux->comp_brands = NULL;
if (qtdemux->tag_list)
gst_tag_list_free (qtdemux->tag_list);
gst_tag_list_unref (qtdemux->tag_list);
qtdemux->tag_list = NULL;
#if 0
if (qtdemux->element_index)
@ -1912,7 +1912,7 @@ qtdemux_handle_xmp_taglist (GstQTDemux * qtdemux, GstTagList * taglist)
if (qtdemux->tag_list) {
/* prioritize native tags using _KEEP mode */
gst_tag_list_insert (qtdemux->tag_list, taglist, GST_TAG_MERGE_KEEP);
gst_tag_list_free (taglist);
gst_tag_list_unref (taglist);
} else
qtdemux->tag_list = taglist;
}
@ -5184,7 +5184,7 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
gst_element_add_pad (GST_ELEMENT_CAST (qtdemux), stream->pad);
if (stream->pending_tags)
gst_tag_list_free (stream->pending_tags);
gst_tag_list_unref (stream->pending_tags);
stream->pending_tags = list;
/* global tags go on each pad anyway */
stream->send_global_tags = TRUE;
@ -8455,7 +8455,7 @@ qtdemux_tag_add_id32 (GstQTDemux * demux, const char *tag,
}
if (taglist)
gst_tag_list_free (taglist);
gst_tag_list_unref (taglist);
gst_buffer_unref (buf);
}

View file

@ -194,7 +194,7 @@ gst_matroska_demux_finalize (GObject * object)
}
if (demux->common.global_tags) {
gst_tag_list_free (demux->common.global_tags);
gst_tag_list_unref (demux->common.global_tags);
demux->common.global_tags = NULL;
}
@ -309,7 +309,7 @@ gst_matroska_track_free (GstMatroskaTrackContext * track)
}
if (track->pending_tags)
gst_tag_list_free (track->pending_tags);
gst_tag_list_unref (track->pending_tags);
if (track->index_table)
g_array_free (track->index_table, TRUE);
@ -469,7 +469,7 @@ gst_matroska_demux_reset (GstElement * element)
#endif
if (demux->common.global_tags) {
gst_tag_list_free (demux->common.global_tags);
gst_tag_list_unref (demux->common.global_tags);
}
demux->common.global_tags = gst_tag_list_new_empty ();
gst_tag_list_set_scope (demux->common.global_tags, GST_TAG_SCOPE_GLOBAL);

View file

@ -151,7 +151,7 @@ gst_matroska_parse_finalize (GObject * object)
}
if (parse->common.global_tags) {
gst_tag_list_free (parse->common.global_tags);
gst_tag_list_unref (parse->common.global_tags);
parse->common.global_tags = NULL;
}
@ -256,7 +256,7 @@ gst_matroska_track_free (GstMatroskaTrackContext * track)
}
if (track->pending_tags)
gst_tag_list_free (track->pending_tags);
gst_tag_list_unref (track->pending_tags);
if (track->index_table)
g_array_free (track->index_table, TRUE);
@ -370,7 +370,7 @@ gst_matroska_parse_reset (GstElement * element)
#endif
if (parse->common.global_tags) {
gst_tag_list_free (parse->common.global_tags);
gst_tag_list_unref (parse->common.global_tags);
}
parse->common.global_tags = gst_tag_list_new_empty ();

View file

@ -437,7 +437,7 @@ gst_matroska_read_common_found_global_tag (GstMatroskaReadCommon * common,
if (common->global_tags) {
/* nothing sent yet, add to cache */
gst_tag_list_insert (common->global_tags, taglist, GST_TAG_MERGE_APPEND);
gst_tag_list_free (taglist);
gst_tag_list_unref (taglist);
} else {
GstEvent *tag_event = gst_event_new_tag (taglist);
gint i;
@ -713,7 +713,7 @@ gst_matroska_read_common_parse_attachments (GstMatroskaReadCommon * common,
gst_matroska_read_common_found_global_tag (common, el, taglist);
} else {
GST_DEBUG_OBJECT (common, "No valid attachments found");
gst_tag_list_free (taglist);
gst_tag_list_unref (taglist);
}
common->attachments_parsed = TRUE;
@ -1931,7 +1931,7 @@ gst_matroska_read_common_parse_metadata_id_tag (GstMatroskaReadCommon * common,
} else
gst_tag_list_insert (*p_taglist, taglist, GST_TAG_MERGE_APPEND);
gst_tag_list_free (taglist);
gst_tag_list_unref (taglist);
g_array_unref (chapter_targets);
g_array_unref (edition_targets);
@ -1999,7 +1999,7 @@ gst_matroska_read_common_parse_metadata (GstMatroskaReadCommon * common,
if (G_LIKELY (!gst_tag_list_is_empty (taglist)))
gst_matroska_read_common_found_global_tag (common, el, taglist);
else
gst_tag_list_free (taglist);
gst_tag_list_unref (taglist);
return ret;
}

View file

@ -224,7 +224,7 @@ gst_wavparse_reset (GstWavParse * wav)
wav->adapter = NULL;
}
if (wav->tags)
gst_tag_list_free (wav->tags);
gst_tag_list_unref (wav->tags);
wav->tags = NULL;
if (wav->toc)
gst_toc_unref (wav->toc);
@ -1727,8 +1727,8 @@ gst_wavparse_stream_headers (GstWavParse * wav)
wav->tags =
gst_tag_list_merge (old, new, GST_TAG_MERGE_REPLACE);
if (old)
gst_tag_list_free (old);
gst_tag_list_free (new);
gst_tag_list_unref (old);
gst_tag_list_unref (new);
}
gst_buffer_unref (buf);
wav->offset += GST_ROUND_UP_2 (data_size);

View file

@ -328,7 +328,7 @@ test_taglib_apev2mux_with_tags (GstTagList * tags, guint32 mask)
GST_LOG ("Got tags: %" GST_PTR_FORMAT, tags_read);
test_taglib_apev2mux_check_tags (tags_read, mask);
gst_tag_list_free (tags_read);
gst_tag_list_unref (tags_read);
GST_LOG ("Waiting for EOS ...");
msg = gst_bus_poll (bus, GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1);
@ -367,7 +367,7 @@ GST_START_TEST (test_apev2mux)
/* internal consistency check */
tags = test_taglib_apev2mux_create_tags (0xFFFFFFFF);
test_taglib_apev2mux_check_tags (tags, 0xFFFFFFFF);
gst_tag_list_free (tags);
gst_tag_list_unref (tags);
/* now the real tests */
for (i = 0; i < 50; ++i) {
@ -390,7 +390,7 @@ GST_START_TEST (test_apev2mux)
test_taglib_apev2mux_with_tags (tags, mask);
/* free tags */
gst_tag_list_free (tags);
gst_tag_list_unref (tags);
}
}

View file

@ -186,7 +186,7 @@ GST_START_TEST (test_demux)
fail_unless_equals_string (TEST_METADATA, (char *) tag);
gst_tag_list_free (tags);
gst_tag_list_unref (tags);
gst_message_unref (message);
gst_caps_unref (caps);

View file

@ -124,7 +124,7 @@ run_check_for_file (const gchar * filename, CheckTagsFunc * check_func)
tags = read_tags_from_file (filename, FALSE);
fail_unless (tags != NULL, "Failed to extract tags from '%s'", filename);
check_func (tags, filename);
gst_tag_list_free (tags);
gst_tag_list_unref (tags);
/* FIXME: need to fix id3demux for short content in push mode */
#if 0
@ -132,7 +132,7 @@ run_check_for_file (const gchar * filename, CheckTagsFunc * check_func)
tags = read_tags_from_file (filename, TRUE);
fail_unless (tags != NULL, "Failed to extract tags from '%s'", filename);
check_func (tags, filename);
gst_tag_list_free (tags);
gst_tag_list_unref (tags);
#endif
}

View file

@ -434,7 +434,7 @@ test_taglib_id3mux_with_tags (GstTagList * tags, guint32 mask)
GST_LOG ("Got tags: %" GST_PTR_FORMAT, tags_read);
test_taglib_id3mux_check_tags (tags_read, mask);
gst_tag_list_free (tags_read);
gst_tag_list_unref (tags_read);
fail_unless (tagbuf != NULL);
test_taglib_id3mux_check_tag_buffer (tagbuf, mask);
@ -477,7 +477,7 @@ GST_START_TEST (test_id3v2mux)
/* internal consistency check */
tags = test_taglib_id3mux_create_tags (0xFFFFFFFF);
test_taglib_id3mux_check_tags (tags, 0xFFFFFFFF);
gst_tag_list_free (tags);
gst_tag_list_unref (tags);
/* now the real tests */
for (i = 0; i < 50; ++i) {
@ -500,7 +500,7 @@ GST_START_TEST (test_id3v2mux)
test_taglib_id3mux_with_tags (tags, mask);
/* free tags */
gst_tag_list_free (tags);
gst_tag_list_unref (tags);
}
}

View file

@ -768,7 +768,7 @@ extract_tags (const gchar * location, GstTagList ** taglist)
gst_message_parse_tag (msg, &tags);
gst_tag_list_insert (*taglist, tags, GST_TAG_MERGE_REPLACE);
gst_tag_list_free (tags);
gst_tag_list_unref (tags);
}
gst_message_unref (msg);
}
@ -858,7 +858,7 @@ test_average_bitrate_custom (const gchar * elementname,
(guint) gst_util_uint64_scale_round ((guint64) total_bytes,
(guint64) 8 * GST_SECOND, (guint64) total_duration);
fail_unless (bitrate == expected);
gst_tag_list_free (taglist);
gst_tag_list_unref (taglist);
}
/* delete file */

View file

@ -760,7 +760,7 @@ GST_START_TEST (test_no_buffer_album_2)
fail_unless_track_gain (tag_list, -6.20);
/* Album is not finished yet: */
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 1);
/* No buffer for the last track. */
@ -774,7 +774,7 @@ GST_START_TEST (test_no_buffer_album_2)
fail_unless_album_gain (tag_list, -6.20);
/* No track tags should be posted, as there was no data for it: */
fail_if_track_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 0);
cleanup_rganalysis (element);
@ -854,7 +854,7 @@ GST_START_TEST (test_peak_float)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 1.369);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
/* Swapped channels. */
send_flush_events (element);
@ -863,7 +863,7 @@ GST_START_TEST (test_peak_float)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 1.369);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
/* Mono. */
send_flush_events (element);
@ -872,7 +872,7 @@ GST_START_TEST (test_peak_float)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 1.369);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
cleanup_rganalysis (element);
}
@ -892,7 +892,7 @@ GST_START_TEST (test_peak_int16_16)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.5);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
/* Swapped channels. */
send_flush_events (element);
@ -901,7 +901,7 @@ GST_START_TEST (test_peak_int16_16)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.5);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
/* Mono. */
send_flush_events (element);
@ -910,7 +910,7 @@ GST_START_TEST (test_peak_int16_16)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.5);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
/* Half amplitude, negative variant. */
send_flush_events (element);
@ -919,7 +919,7 @@ GST_START_TEST (test_peak_int16_16)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.5);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
/* Swapped channels. */
send_flush_events (element);
@ -928,7 +928,7 @@ GST_START_TEST (test_peak_int16_16)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.5);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
/* Mono. */
send_flush_events (element);
@ -937,7 +937,7 @@ GST_START_TEST (test_peak_int16_16)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.5);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
/* Now check for correct normalization of the peak value: Sample
@ -951,7 +951,7 @@ GST_START_TEST (test_peak_int16_16)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 32767. / 32768.);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
/* Swapped channels. */
send_flush_events (element);
@ -960,7 +960,7 @@ GST_START_TEST (test_peak_int16_16)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 32767. / 32768.);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
/* Mono. */
send_flush_events (element);
@ -969,7 +969,7 @@ GST_START_TEST (test_peak_int16_16)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 32767. / 32768.);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
/* Negative variant, reaching 1.0. */
@ -979,7 +979,7 @@ GST_START_TEST (test_peak_int16_16)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 1.0);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
/* Swapped channels. */
send_flush_events (element);
@ -988,7 +988,7 @@ GST_START_TEST (test_peak_int16_16)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 1.0);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
/* Mono. */
send_flush_events (element);
@ -997,7 +997,7 @@ GST_START_TEST (test_peak_int16_16)
send_eos_event (element);
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 1.0);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
cleanup_rganalysis (element);
}
@ -1018,7 +1018,7 @@ GST_START_TEST (test_peak_album)
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 1.0);
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 1);
send_flush_events (element);
@ -1028,7 +1028,7 @@ GST_START_TEST (test_peak_album)
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.5);
fail_unless_album_peak (tag_list, 1.0);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 0);
/* Try a second album: */
@ -1041,7 +1041,7 @@ GST_START_TEST (test_peak_album)
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.4);
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 2);
send_flush_events (element);
@ -1051,7 +1051,7 @@ GST_START_TEST (test_peak_album)
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.45);
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 1);
send_flush_events (element);
@ -1061,7 +1061,7 @@ GST_START_TEST (test_peak_album)
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.2);
fail_unless_album_peak (tag_list, 0.45);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 0);
/* And now a single track, not in album mode (num-tracks is 0
@ -1073,7 +1073,7 @@ GST_START_TEST (test_peak_album)
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.1);
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
cleanup_rganalysis (element);
}
@ -1095,7 +1095,7 @@ GST_START_TEST (test_peak_track_album)
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 1.0);
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
g_object_set (element, "num-tracks", 1, NULL);
send_flush_events (element);
@ -1105,7 +1105,7 @@ GST_START_TEST (test_peak_track_album)
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.5);
fail_unless_album_peak (tag_list, 0.5);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 0);
cleanup_rganalysis (element);
@ -1132,7 +1132,7 @@ GST_START_TEST (test_peak_album_abort_to_track)
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 1.0);
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 1);
g_object_set (element, "num-tracks", 0, NULL);
@ -1144,7 +1144,7 @@ GST_START_TEST (test_peak_album_abort_to_track)
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.5);
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
cleanup_rganalysis (element);
}
@ -1173,7 +1173,7 @@ GST_START_TEST (test_gain_album)
fail_unless_track_peak (tag_list, 0.75);
fail_unless_track_gain (tag_list, -15.70);
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
send_flush_events (element);
send_segment_event (element);
@ -1186,7 +1186,7 @@ GST_START_TEST (test_gain_album)
fail_unless_track_peak (tag_list, 0.5);
fail_unless_track_gain (tag_list, -12.22);
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
send_flush_events (element);
send_segment_event (element);
@ -1203,7 +1203,7 @@ GST_START_TEST (test_gain_album)
/* Strangely, wavegain reports -12.17 for the album, but the fixed
* metaflac agrees to us. Could be a 32767 vs. 32768 issue. */
fail_unless_album_gain (tag_list, -12.18);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
cleanup_rganalysis (element);
}
@ -1246,7 +1246,7 @@ GST_START_TEST (test_forced)
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.25);
fail_unless_track_gain (tag_list, get_expected_gain (44100));
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
cleanup_rganalysis (element);
}
@ -1295,7 +1295,7 @@ GST_START_TEST (test_forced_separate)
fail_unless_track_peak (tag_list, 0.25);
fail_unless_track_gain (tag_list, get_expected_gain (44100));
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
cleanup_rganalysis (element);
}
@ -1340,7 +1340,7 @@ GST_START_TEST (test_forced_after_data)
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.25);
fail_unless_track_gain (tag_list, get_expected_gain (8000));
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
cleanup_rganalysis (element);
}
@ -1389,7 +1389,7 @@ GST_START_TEST (test_forced_album)
fail_unless_track_peak (tag_list, 0.25);
fail_unless_track_gain (tag_list, get_expected_gain (44100));
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 1);
send_flush_events (element);
@ -1404,7 +1404,7 @@ GST_START_TEST (test_forced_album)
fail_unless_track_gain (tag_list, get_expected_gain (44100));
fail_unless_album_peak (tag_list, 0.25);
fail_unless_album_gain (tag_list, get_expected_gain (44100));
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 0);
cleanup_rganalysis (element);
@ -1459,7 +1459,7 @@ GST_START_TEST (test_forced_album_skip)
fail_unless_track_peak (tag_list, 0.25);
fail_unless_track_gain (tag_list, get_expected_gain (8000));
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
cleanup_rganalysis (element);
}
@ -1485,7 +1485,7 @@ GST_START_TEST (test_forced_album_no_skip)
fail_unless_track_peak (tag_list, 0.25);
fail_unless_track_gain (tag_list, get_expected_gain (8000));
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 1);
/* The second track has indeed full tags, but although being not forced, this
@ -1510,7 +1510,7 @@ GST_START_TEST (test_forced_album_no_skip)
/* Statistical processing leads to the second track being
* ignored for the gain (because it is so short): */
fail_unless_album_gain (tag_list, get_expected_gain (8000));
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 0);
cleanup_rganalysis (element);
@ -1537,7 +1537,7 @@ GST_START_TEST (test_forced_abort_album_no_skip)
fail_unless_track_peak (tag_list, 0.25);
fail_unless_track_gain (tag_list, get_expected_gain (8000));
fail_if_album_tags (tag_list);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
fail_unless_num_tracks (element, 1);
/* Disabling album processing before end of album: */
@ -1585,7 +1585,7 @@ GST_START_TEST (test_reference_level)
fail_unless (gst_tag_list_get_double (tag_list, GST_TAG_REFERENCE_LEVEL,
&ref_level) && MATCH_GAIN (ref_level, 89.),
"Incorrect reference level tag");
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
g_object_set (element, "reference-level", 83., "num-tracks", 2, NULL);
@ -1602,7 +1602,7 @@ GST_START_TEST (test_reference_level)
fail_unless (gst_tag_list_get_double (tag_list, GST_TAG_REFERENCE_LEVEL,
&ref_level) && MATCH_GAIN (ref_level, 83.),
"Incorrect reference level tag");
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
send_flush_events (element);
send_segment_event (element);
@ -1621,7 +1621,7 @@ GST_START_TEST (test_reference_level)
fail_unless (gst_tag_list_get_double (tag_list, GST_TAG_REFERENCE_LEVEL,
&ref_level) && MATCH_GAIN (ref_level, 83.),
"Incorrect reference level tag");
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
cleanup_rganalysis (element);
}
@ -1656,7 +1656,7 @@ GST_START_TEST (test_all_formats)
tag_list = poll_tags (element);
fail_unless_track_peak (tag_list, 0.25);
fail_unless_track_gain (tag_list, supported_rates[i].gain);
gst_tag_list_free (tag_list);
gst_tag_list_unref (tag_list);
}
cleanup_rganalysis (element);
@ -1687,7 +1687,7 @@ GST_END_TEST;
fail_unless_track_peak (tag_list, 0.25); \
fail_unless_track_gain (tag_list, \
get_expected_gain (sample_rate)); \
gst_tag_list_free (tag_list); \
gst_tag_list_unref (tag_list); \
\
cleanup_rganalysis (element); \
} \
@ -1712,7 +1712,7 @@ GST_END_TEST;
fail_unless_track_peak (tag_list, 0.25); \
fail_unless_track_gain (tag_list, \
get_expected_gain (sample_rate)); \
gst_tag_list_free (tag_list); \
gst_tag_list_unref (tag_list); \
\
cleanup_rganalysis (element); \
} \
@ -1738,7 +1738,7 @@ GST_END_TEST;
fail_unless_track_peak (tag_list, 0.25); \
fail_unless_track_gain (tag_list, \
get_expected_gain (sample_rate)); \
gst_tag_list_free (tag_list); \
gst_tag_list_unref (tag_list); \
\
cleanup_rganalysis (element); \
} \
@ -1764,7 +1764,7 @@ GST_END_TEST;
fail_unless_track_peak (tag_list, 0.25); \
fail_unless_track_gain (tag_list, \
get_expected_gain (sample_rate)); \
gst_tag_list_free (tag_list); \
gst_tag_list_unref (tag_list); \
\
cleanup_rganalysis (element); \
} \

View file

@ -55,10 +55,10 @@ bus_handler (GstBus * bus, GstMessage * message, gpointer data)
ntl = gst_tag_list_merge (received_tags, tl, GST_TAG_MERGE_PREPEND);
if (ntl) {
GST_LOG ("taglists merged: %" GST_PTR_FORMAT, ntl);
gst_tag_list_free (received_tags);
gst_tag_list_unref (received_tags);
received_tags = ntl;
}
gst_tag_list_free (tl);
gst_tag_list_unref (tl);
}
}
break;
@ -115,7 +115,7 @@ test_mux_tags (const gchar * tag_str, const gchar * caps,
sent_tags = gst_tag_list_new_from_string (tag_str);
fail_unless (sent_tags != NULL);
gst_tag_setter_merge_tags (setter, sent_tags, GST_TAG_MERGE_REPLACE);
gst_tag_list_free (sent_tags);
gst_tag_list_unref (sent_tags);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
g_main_loop_run (loop);
@ -155,7 +155,7 @@ test_demux_tags (const gchar * tag_str, const gchar * demuxer,
GST_DEBUG ("testing tags : %s", tag_str);
if (received_tags) {
gst_tag_list_free (received_tags);
gst_tag_list_unref (received_tags);
received_tags = NULL;
}
@ -232,9 +232,9 @@ test_demux_tags (const gchar * tag_str, const gchar * demuxer,
fail_unless (found, "tag item %s is lost", name_sent);
}
gst_tag_list_free (received_tags);
gst_tag_list_unref (received_tags);
received_tags = NULL;
gst_tag_list_free (sent_tags);
gst_tag_list_unref (sent_tags);
gst_element_set_state (pipeline, GST_STATE_NULL);