videofilter: Unit test send SEGMENT before CAPS
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Wed, 8 May 2013 23:54:19 +0000 (19:54 -0400)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 9 May 2013 07:08:01 +0000 (09:08 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=699966

tests/check/elements/videofilter.c

index 1dd5cc1..bf054cf 100644 (file)
@@ -88,12 +88,12 @@ check_filter_caps (const gchar * name, GstCaps * caps, gint size,
           GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
       "could not set to playing");
 
+  gst_pad_set_caps (mysrcpad, caps);
+
   /* ensure segment (format) properly setup */
   gst_segment_init (&segment, GST_FORMAT_TIME);
   fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
 
-  gst_pad_set_caps (mysrcpad, caps);
-
   for (i = 0; i < num_buffers; ++i) {
     inbuffer = gst_buffer_new_and_alloc (size);
     /* makes valgrind's memcheck happier */