mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
tests/gst-launch: Fix sample memory leak
When sample is got using gst_tag_list_get_sample_index, it should be free'd. https://bugzilla.gnome.org/show_bug.cgi?id=756069
This commit is contained in:
parent
3e8ef4cf5a
commit
456ef2aa1d
2 changed files with 5 additions and 0 deletions
|
@ -373,9 +373,13 @@ GST_START_TEST (test_buffer_tags)
|
|||
gst_sample_unref (s2);
|
||||
|
||||
fail_if (gst_tag_list_get_sample_index (tags, GST_TAG_IMAGE, 1, &s1));
|
||||
gst_sample_unref (s1);
|
||||
fail_if (gst_tag_list_get_sample_index (tags, GST_TAG_IMAGE, 2, &s1));
|
||||
gst_sample_unref (s1);
|
||||
fail_if (gst_tag_list_get_sample_index (tags, GST_TAG_PREVIEW_IMAGE, 1, &s1));
|
||||
gst_sample_unref (s1);
|
||||
fail_if (gst_tag_list_get_sample_index (tags, GST_TAG_PREVIEW_IMAGE, 2, &s1));
|
||||
gst_sample_unref (s1);
|
||||
|
||||
fail_if (!gst_tag_list_get_sample_index (tags, GST_TAG_IMAGE, 0, &s1));
|
||||
fail_if (!gst_tag_list_get_sample_index (tags, GST_TAG_PREVIEW_IMAGE, 0,
|
||||
|
|
|
@ -371,6 +371,7 @@ print_tag (const GstTagList * list, const gchar * tag, gpointer unused)
|
|||
g_warning ("Couldn't fetch sample for %s tag", tag);
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
gst_sample_unref (sample);
|
||||
} else if (gst_tag_get_type (tag) == GST_TYPE_DATE_TIME) {
|
||||
GstDateTime *dt = NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue