check: lock src state to avoid error cases
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 15 Nov 2010 17:17:36 +0000 (18:17 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 2 Dec 2010 18:10:44 +0000 (19:10 +0100)
Lock the state of the src element or else the pipeline might go into the error
state when we set it to PAUSED later.

tests/check/generic/sinks.c

index 21b5095..8fe4c81 100644 (file)
@@ -691,6 +691,8 @@ GST_START_TEST (test_added_async2)
 
   /* add source, don't add sink yet */
   gst_bin_add (GST_BIN (pipeline), src);
+  /* need to lock state here or the pipeline might go in error */
+  gst_element_set_locked_state (src, TRUE);
 
   ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
   fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "no SUCCESS state return");