From 214c0d2e714ce35f50d793fa6482beaf3b9a7de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 15 May 2013 10:22:44 +0200 Subject: [PATCH] shm: Fix event handling in unit test --- tests/check/elements/shm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/check/elements/shm.c b/tests/check/elements/shm.c index 0ff98f803e..e8b1d73e88 100644 --- a/tests/check/elements/shm.c +++ b/tests/check/elements/shm.c @@ -82,6 +82,11 @@ GST_START_TEST (test_shm_sysmem_alloc) { GstBuffer *buf; GstState state, pending; + GstSegment segment; + + gst_pad_push_event (srcpad, gst_event_new_stream_start ("test")); + gst_segment_init (&segment, GST_FORMAT_BYTES); + gst_pad_push_event (srcpad, gst_event_new_segment (&segment)); buf = gst_buffer_new_allocate (NULL, 1000, NULL); @@ -116,6 +121,12 @@ GST_START_TEST (test_shm_alloc) GstAllocator *alloc; GstAllocationParams params; guint size; + GstSegment segment; + + gst_pad_push_event (srcpad, gst_event_new_stream_start ("test")); + gst_pad_push_event (srcpad, gst_event_new_caps (caps)); + gst_segment_init (&segment, GST_FORMAT_BYTES); + gst_pad_push_event (srcpad, gst_event_new_segment (&segment)); query = gst_query_new_allocation (caps, FALSE); gst_caps_unref (caps);