From a9e5d1246a267eb85fc4a45f44a3119cb7db7277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 14 Sep 2012 00:47:38 +0100 Subject: [PATCH] tests: push stream-start and segment events in wavpackenc test --- tests/check/elements/wavpackenc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/check/elements/wavpackenc.c b/tests/check/elements/wavpackenc.c index 72f6cd11c7..41f470c660 100644 --- a/tests/check/elements/wavpackenc.c +++ b/tests/check/elements/wavpackenc.c @@ -81,6 +81,8 @@ setup_wavpackenc (void) "could not set to playing"); bus = gst_bus_new (); + gst_pad_push_event (mysrcpad, gst_event_new_stream_start ("test-silence")); + return wavpackenc; } @@ -104,6 +106,7 @@ cleanup_wavpackenc (GstElement * wavpackenc) GST_START_TEST (test_encode_silence) { + GstSegment segment; GstElement *wavpackenc; GstBuffer *inbuffer, *outbuffer; GstCaps *caps; @@ -112,11 +115,17 @@ GST_START_TEST (test_encode_silence) wavpackenc = setup_wavpackenc (); + gst_segment_init (&segment, GST_FORMAT_TIME); + inbuffer = gst_buffer_new_and_alloc (1000); gst_buffer_memset (inbuffer, 0, 0, 1000); + caps = gst_caps_from_string (RAW_CAPS_STRING); fail_unless (gst_pad_set_caps (mysrcpad, caps)); gst_caps_unref (caps); + + gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)); + GST_BUFFER_TIMESTAMP (inbuffer) = 0; ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);