gst/schedulers/threadscheduler.c: Unlock the STREAM_LOCK completely.

Original commit message from CVS:
* gst/schedulers/threadscheduler.c: (gst_thread_scheduler_func),
(gst_thread_scheduler_dispose):
Unlock the STREAM_LOCK completely.
This commit is contained in:
Wim Taymans 2005-07-07 14:01:47 +00:00
parent 188b655898
commit adf701a8cc
2 changed files with 15 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2005-07-07 Wim Taymans <wim@fluendo.com>
* gst/schedulers/threadscheduler.c: (gst_thread_scheduler_func),
(gst_thread_scheduler_dispose):
Unlock the STREAM_LOCK completely.
2005-07-07 Thomas Vander Stichele <thomas at apestaart dot org>
* check/Makefile.am:

View file

@ -289,12 +289,19 @@ gst_thread_scheduler_func (GstThreadSchedulerTask * ttask,
GST_LOCK (task);
while (G_LIKELY (task->state != GST_TASK_STOPPED)) {
while (G_UNLIKELY (task->state == GST_TASK_PAUSED)) {
GST_TASK_UNLOCK (task);
guint t;
t = GST_TASK_UNLOCK_FULL (task);
if (t <= 0) {
g_warning ("wrong STREAM_LOCK count");
}
GST_TASK_SIGNAL (task);
GST_TASK_WAIT (task);
GST_UNLOCK (task);
/* locking order.. */
GST_TASK_LOCK (task);
if (t > 0)
GST_TASK_LOCK_FULL (task, t);
GST_LOCK (task);
if (task->state == GST_TASK_STOPPED)
goto done;