From 028b9a8dbb80b4d3d0cd24fe43a9d46c59f74754 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 17 Jul 2012 15:52:53 +0200 Subject: [PATCH] check: Avoid deadlock Queries will be sent when pipeline goes down to NULL, which would result in the probe being called ... but can't take the lock. --- tests/check/gst/gstghostpad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/check/gst/gstghostpad.c b/tests/check/gst/gstghostpad.c index 3212553b14..2a72ec545c 100644 --- a/tests/check/gst/gstghostpad.c +++ b/tests/check/gst/gstghostpad.c @@ -521,8 +521,8 @@ GST_START_TEST (test_ghost_pads_block) gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING); /* and wait now */ g_cond_wait (block_data.cond, block_data.mutex); - gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL); g_mutex_unlock (block_data.mutex); + gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL); g_mutex_free (block_data.mutex); g_cond_free (block_data.cond); @@ -563,8 +563,8 @@ GST_START_TEST (test_ghost_pads_probes) gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING); /* and wait now */ g_cond_wait (block_data.cond, block_data.mutex); - gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL); g_mutex_unlock (block_data.mutex); + gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL); g_mutex_free (block_data.mutex); g_cond_free (block_data.cond);