tests: gstelement: Fix test_add_pad_while_paused flakiness

`gst_element_remove_pad()` doesn't automatically deactivate the pad, it has to
be done explicitly beforehand, otherwise the pad task might be left dangling,
exposed to undefined behaviour.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3651>
This commit is contained in:
Philippe Normand 2022-12-28 17:42:31 +00:00 committed by Tim-Philipp Müller
parent ebe44034c1
commit 9aa8393e06

View file

@ -113,6 +113,7 @@ GST_START_TEST (test_add_pad_while_paused)
gst_element_set_state (e, GST_STATE_PAUSED);
{
GstPad *old_pad = gst_element_get_static_pad (e, "src");
gst_pad_set_active (old_pad, FALSE);
gst_element_remove_pad (e, old_pad);
gst_object_unref (old_pad);
}