ext/mad/gstid3tag.c (gst_mad_id3_to_tag_list): unset GValues after calling transform.

Original commit message from CVS:
* ext/mad/gstid3tag.c (gst_mad_id3_to_tag_list): unset GValues after
calling transform.
(gst_id3_tag_do_typefind): Unref caps

* ext/mad/gstmad.c (gst_mad_check_caps_reset): Ditto
This commit is contained in:
Johan Dahlin 2005-11-15 22:46:23 +00:00
parent ec83de8d48
commit d62642b8f8
3 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2005-11-15 Johan Dahlin <johan@gnome.org>
* ext/mad/gstid3tag.c (gst_mad_id3_to_tag_list): unset GValues after
calling transform.
(gst_id3_tag_do_typefind): Unref caps
* ext/mad/gstmad.c (gst_mad_check_caps_reset): Ditto
2005-11-15 Tim-Philipp Müller <tim at centricular dot net>
* ext/mpeg2dec/gstmpeg2dec.c: (handle_slice),

View file

@ -693,6 +693,7 @@ gst_mad_id3_to_tag_list (const struct id3_tag * tag)
g_value_init (&src, G_TYPE_STRING);
g_value_set_string (&src, (const gchar *) utf8);
g_value_init (&dest, tag_type);
if (g_value_transform (&src, &dest)) {
gst_tag_list_add_values (tag_list, GST_TAG_MERGE_APPEND,
@ -701,6 +702,8 @@ gst_mad_id3_to_tag_list (const struct id3_tag * tag)
GST_WARNING ("Failed to transform tag from string to type '%s'",
g_type_name (tag_type));
}
g_value_unset (&src);
g_value_unset (&dest);
break;
}
}
@ -990,7 +993,10 @@ simple_find_suggest (gpointer data, guint probability, const GstCaps * caps)
SimpleTypeFind *find = (SimpleTypeFind *) data;
if (probability > find->best_probability) {
gst_caps_replace (&find->caps, gst_caps_copy (caps));
GstCaps *copy = gst_caps_copy (caps);
gst_caps_replace (&find->caps, copy);
gst_caps_unref (copy);
find->best_probability = probability;
}
}

View file

@ -1218,6 +1218,8 @@ gst_mad_check_caps_reset (GstMad * mad)
"rate", G_TYPE_INT, rate, "channels", G_TYPE_INT, nchannels, NULL);
gst_pad_set_caps (mad->srcpad, caps);
gst_caps_unref (caps);
mad->caps_set = TRUE; /* set back to FALSE on discont */
mad->channels = nchannels;
mad->rate = rate;