decodebin_next: fix caps and tags leaks

The getters are (transfer full).

https://bugzilla.gnome.org/show_bug.cgi?id=769270
This commit is contained in:
Guillaume Desmottes 2016-07-28 15:44:27 +02:00 committed by Edward Hervey
parent ba74c06721
commit 12c268b7c5
2 changed files with 8 additions and 4 deletions

View file

@ -79,8 +79,8 @@ static void
dump_collection (GstStreamCollection * collection)
{
guint i;
const GstTagList *tags;
const GstCaps *caps;
GstTagList *tags;
GstCaps *caps;
for (i = 0; i < gst_stream_collection_get_size (collection); i++) {
GstStream *stream = gst_stream_collection_get_stream (collection, i);
@ -94,12 +94,14 @@ dump_collection (GstStreamCollection * collection)
gchar *caps_str = gst_caps_to_string (caps);
g_print (" caps: %s\n", caps_str);
g_free (caps_str);
gst_caps_unref (caps);
}
tags = gst_stream_get_tags (stream);
if (tags) {
g_print (" tags:\n");
gst_tag_list_foreach (tags, print_tag_foreach, GUINT_TO_POINTER (3));
gst_tag_list_unref (tags);
}
}
}

View file

@ -73,8 +73,8 @@ static void
dump_collection (GstStreamCollection * collection)
{
guint i;
const GstTagList *tags;
const GstCaps *caps;
GstTagList *tags;
GstCaps *caps;
for (i = 0; i < gst_stream_collection_get_size (collection); i++) {
GstStream *stream = gst_stream_collection_get_stream (collection, i);
@ -88,12 +88,14 @@ dump_collection (GstStreamCollection * collection)
gchar *caps_str = gst_caps_to_string (caps);
g_print (" caps: %s\n", caps_str);
g_free (caps_str);
gst_caps_unref (caps);
}
tags = gst_stream_get_tags (stream);
if (tags) {
g_print (" tags:\n");
gst_tag_list_foreach (tags, print_tag_foreach, GUINT_TO_POINTER (3));
gst_tag_list_unref (tags);
}
}
}