gstreamer_core/tsrc/check/elements/gstqueue/src/gstqueue.c
changeset 24 bc39b352897e
parent 18 5824eee55f42
--- a/gstreamer_core/tsrc/check/elements/gstqueue/src/gstqueue.c	Fri Jun 25 17:18:46 2010 -0500
+++ b/gstreamer_core/tsrc/check/elements/gstqueue/src/gstqueue.c	Fri Jul 09 16:26:45 2010 -0500
@@ -324,13 +324,13 @@
   /* pushing gives away my reference ... */
   gst_pad_push (mysrcpad, gst_buffer_ref (buffer3));
 
-  //g_mutex_lock (check_mutex);
+  g_mutex_lock (check_mutex);
   /* start the src-task briefly leak buffer3 */
   gst_pad_set_active (mysinkpad, TRUE);
-  //g_cond_wait (check_cond, check_mutex);
-  //g_mutex_unlock (check_mutex);
+  g_cond_wait (check_cond, check_mutex);
+  g_mutex_unlock (check_mutex);
   /// wait for second thread to read buffer.
-  sleep(2);
+  //sleep(2);
   gst_pad_set_active (mysinkpad, FALSE);
 
   GST_DEBUG ("stopping");
@@ -416,12 +416,12 @@
   /* pushing gives away my reference ... */
   gst_pad_push (mysrcpad, buffer3);
 
-  //g_mutex_lock (check_mutex);
+  g_mutex_lock (check_mutex);
   /* start the src-task briefly and leak buffer1 */
   gst_pad_set_active (mysinkpad, TRUE);
-  //g_cond_wait (check_cond, check_mutex);
-  //g_mutex_unlock (check_mutex);
-  sleep(2);
+  g_cond_wait (check_cond, check_mutex);
+  g_mutex_unlock (check_mutex);
+  //sleep(2);
   gst_pad_set_active (mysinkpad, FALSE);
 
   GST_DEBUG ("stopping");