mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-17 04:45:47 +00:00
check: Remove a minor leak in unit test
Makes valgrind happy
This commit is contained in:
parent
a00cc4338a
commit
7b014d67a7
1 changed files with 5 additions and 3 deletions
|
@ -251,6 +251,7 @@ GST_START_TEST (test_push_pending_events)
|
||||||
GstTagList *tags;
|
GstTagList *tags;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
GstEvent *event;
|
GstEvent *event;
|
||||||
|
GstCaps *caps;
|
||||||
|
|
||||||
filter = gst_check_setup_element ("capsfilter");
|
filter = gst_check_setup_element ("capsfilter");
|
||||||
mysinkpad = gst_check_setup_sink_pad (filter, &sinktemplate);
|
mysinkpad = gst_check_setup_sink_pad (filter, &sinktemplate);
|
||||||
|
@ -278,9 +279,10 @@ GST_START_TEST (test_push_pending_events)
|
||||||
fail_unless (g_list_length (events) == 0);
|
fail_unless (g_list_length (events) == 0);
|
||||||
|
|
||||||
/* push a caps */
|
/* push a caps */
|
||||||
fail_unless (gst_pad_push_event (mysrcpad,
|
caps = gst_caps_from_string ("audio/x-raw, "
|
||||||
gst_event_new_caps (gst_caps_from_string ("audio/x-raw, "
|
"channels=(int)2, " "rate = (int)44100");
|
||||||
"channels=(int)2, " "rate = (int)44100"))));
|
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_caps (caps)));
|
||||||
|
gst_caps_unref (caps);
|
||||||
fail_unless (g_list_length (events) == 1);
|
fail_unless (g_list_length (events) == 1);
|
||||||
event = events->data;
|
event = events->data;
|
||||||
fail_unless (GST_EVENT_TYPE (event) == GST_EVENT_CAPS);
|
fail_unless (GST_EVENT_TYPE (event) == GST_EVENT_CAPS);
|
||||||
|
|
Loading…
Reference in a new issue