tests: clean up properly in the bin test_link_structure_change unit test
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 24 Apr 2011 10:44:19 +0000 (11:44 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 24 Apr 2011 10:48:21 +0000 (11:48 +0100)
Don't forget to set the pipeline back to NULL state, which makes
valgrind happy again.

tests/check/gst/gstbin.c

index 3adfd9f..c81fdeb 100644 (file)
@@ -1006,10 +1006,12 @@ GST_START_TEST (test_link_structure_change)
   gst_element_get_state (pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
 
   /* the state change will be done on src only if the pipeline correctly resyncs
-   * after that filesrc has been linked to identity */
+   * after that fakesrc has been linked to identity */
   gst_element_get_state (src, &state, NULL, 0);
   fail_unless_equals_int (state, GST_STATE_READY);
 
+  /* clean up */
+  gst_element_set_state (pipeline, GST_STATE_NULL);
   gst_object_unref (bus);
   gst_object_unref (pipeline);
 }