tests: fix shm test deadlock

Stopping the consumer first would occasionally allow the producer
to fill the shm segment causing it to block in send() and unable
to be stopped.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2158>
This commit is contained in:
Doug Nazar 2021-04-13 06:40:43 -04:00 committed by GStreamer Marge Bot
parent a930b62afc
commit a1535a4dc3

View file

@ -215,10 +215,10 @@ GST_START_TEST (test_shm_live)
g_signal_emit_by_name (sink, "pull-sample", &sample);
gst_sample_unref (sample);
state_res = gst_element_set_state (consumer, GST_STATE_NULL);
state_res = gst_element_set_state (producer, GST_STATE_NULL);
fail_unless (state_res != GST_STATE_CHANGE_FAILURE);
state_res = gst_element_set_state (producer, GST_STATE_NULL);
state_res = gst_element_set_state (consumer, GST_STATE_NULL);
fail_unless (state_res != GST_STATE_CHANGE_FAILURE);
gst_object_unref (consumer);