From 3b5deb2b45bbae8dfb37cad10472a6d086ff919e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 3 May 2014 11:43:21 +0200 Subject: [PATCH] shapewipe: Send initial events after setting the elements to PLAYING Otherwise we send them too early, and setting the elements to PLAYING afterwards will drop all the events again. --- tests/check/elements/shapewipe.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/check/elements/shapewipe.c b/tests/check/elements/shapewipe.c index 40496009fb..e68d38bd4e 100644 --- a/tests/check/elements/shapewipe.c +++ b/tests/check/elements/shapewipe.c @@ -96,16 +96,10 @@ GST_START_TEST (test_general) gst_pad_new_from_static_template (&videosrctemplate, "videosrc"); gst_element_add_pad (videosrc, myvideosrcpad); gst_pad_set_active (myvideosrcpad, TRUE); - caps = gst_caps_from_string (SHAPEWIPE_VIDEO_CAPS_STRING); - gst_check_setup_events (myvideosrcpad, videosrc, caps, GST_FORMAT_TIME); - gst_caps_unref (caps); mymasksrcpad = gst_pad_new_from_static_template (&masksrctemplate, "masksrc"); gst_element_add_pad (masksrc, mymasksrcpad); gst_pad_set_active (mymasksrcpad, TRUE); - caps = gst_caps_from_string (SHAPEWIPE_MASK_CAPS_STRING); - gst_check_setup_events (mymasksrcpad, masksrc, caps, GST_FORMAT_TIME); - gst_caps_unref (caps); mysinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink"); gst_element_add_pad (sink, mysinkpad); @@ -125,6 +119,14 @@ GST_START_TEST (test_general) fail_unless (gst_element_set_state (bin, GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS); + caps = gst_caps_from_string (SHAPEWIPE_MASK_CAPS_STRING); + gst_check_setup_events (mymasksrcpad, masksrc, caps, GST_FORMAT_TIME); + gst_caps_unref (caps); + + caps = gst_caps_from_string (SHAPEWIPE_VIDEO_CAPS_STRING); + gst_check_setup_events (myvideosrcpad, videosrc, caps, GST_FORMAT_TIME); + gst_caps_unref (caps); + mask = gst_buffer_new_and_alloc (400 * 400); gst_buffer_map (mask, &map, GST_MAP_WRITE); data = map.data;