From: <wt...@fr...> - 2005-07-07 14:04:55
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: wtay Date: Thu Jul 07 2005 07:02:02 PDT Log message: * gst/schedulers/threadscheduler.c: (gst_thread_scheduler_func), (gst_thread_scheduler_dispose): Unlock the STREAM_LOCK completely. Modified files: . : ChangeLog gst/schedulers : threadscheduler.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.1235&r2=1.1236 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/schedulers/threadscheduler.c.diff?r1=1.6&r2=1.7 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.1235 retrieving revision 1.1236 diff -u -d -r1.1235 -r1.1236 --- ChangeLog 7 Jul 2005 11:59:33 -0000 1.1235 +++ ChangeLog 7 Jul 2005 14:01:46 -0000 1.1236 @@ -1,3 +1,9 @@ +2005-07-07 Wim Taymans <wi...@fl...> + + * 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: Index: threadscheduler.c RCS file: /cvs/gstreamer/gstreamer/gst/schedulers/threadscheduler.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- threadscheduler.c 28 Jun 2005 19:45:26 -0000 1.6 +++ threadscheduler.c 7 Jul 2005 14:01:47 -0000 1.7 @@ -289,12 +289,19 @@ 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; |