mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
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:
parent
ba74c06721
commit
12c268b7c5
2 changed files with 8 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue