mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 13:18:52 +00:00
tests: Fix caps leak in the valve test
This commit is contained in:
parent
17e0b91890
commit
284b9f0e84
1 changed files with 6 additions and 4 deletions
|
@ -82,8 +82,9 @@ GST_START_TEST (test_valve_basic)
|
|||
|
||||
fail_unless (gst_pad_push_event (src, gst_event_new_eos ()) == TRUE);
|
||||
fail_unless (event_received == TRUE);
|
||||
fail_unless (gst_pad_alloc_buffer (src, 0, 10, gst_caps_new_any (), &buf) ==
|
||||
GST_FLOW_OK);
|
||||
caps = gst_caps_new_any ();
|
||||
fail_unless (gst_pad_alloc_buffer (src, 0, 10, caps, &buf) == GST_FLOW_OK);
|
||||
gst_caps_unref (caps);
|
||||
fail_unless (buffer_allocated == TRUE);
|
||||
gst_buffer_unref (buf);
|
||||
fail_unless (gst_pad_push (src, gst_buffer_new ()) == GST_FLOW_OK);
|
||||
|
@ -100,8 +101,9 @@ GST_START_TEST (test_valve_basic)
|
|||
g_object_set (valve, "drop", TRUE, NULL);
|
||||
fail_unless (gst_pad_push_event (src, gst_event_new_eos ()) == TRUE);
|
||||
fail_unless (event_received == FALSE);
|
||||
fail_unless (gst_pad_alloc_buffer (src, 0, 10, gst_caps_new_any (), &buf) ==
|
||||
GST_FLOW_OK);
|
||||
caps = gst_caps_new_any ();
|
||||
fail_unless (gst_pad_alloc_buffer (src, 0, 10, caps, &buf) == GST_FLOW_OK);
|
||||
gst_caps_unref (caps);
|
||||
fail_unless (buffer_allocated == FALSE);
|
||||
gst_buffer_unref (buf);
|
||||
fail_unless (gst_pad_push (src, gst_buffer_new ()) == GST_FLOW_OK);
|
||||
|
|
Loading…
Reference in a new issue