mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
gst/schedulers/threadscheduler.c: Ref the task before pushing it on the threadpool. This makes sure that we have a re...
Original commit message from CVS: * gst/schedulers/threadscheduler.c: (gst_thread_scheduler_task_start), (gst_thread_scheduler_task_pause), (gst_thread_scheduler_func): Ref the task before pushing it on the threadpool. This makes sure that we have a ref when the threadfunction is actually called.
This commit is contained in:
parent
09ab1d8fb2
commit
830a0368b4
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-06-23 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/schedulers/threadscheduler.c:
|
||||
(gst_thread_scheduler_task_start),
|
||||
(gst_thread_scheduler_task_pause), (gst_thread_scheduler_func):
|
||||
Ref the task before pushing it on the threadpool. This
|
||||
makes sure that we have a ref when the threadfunction is
|
||||
actually called.
|
||||
|
||||
2005-06-23 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
* gst/base/gstbasesrc.c (gst_basesrc_get_range): Check if the
|
||||
|
|
|
@ -157,6 +157,7 @@ gst_thread_scheduler_task_start (GstTask * task)
|
|||
GST_TASK_CAST (ttask)->state = GST_TASK_STARTED;
|
||||
switch (old) {
|
||||
case GST_TASK_STOPPED:
|
||||
gst_object_ref (GST_OBJECT (task));
|
||||
g_thread_pool_push (tsched->pool, task, NULL);
|
||||
break;
|
||||
case GST_TASK_PAUSED:
|
||||
|
@ -210,6 +211,7 @@ gst_thread_scheduler_task_pause (GstTask * task)
|
|||
GST_TASK_CAST (ttask)->state = GST_TASK_PAUSED;
|
||||
switch (old) {
|
||||
case GST_TASK_STOPPED:
|
||||
gst_object_ref (GST_OBJECT (task));
|
||||
g_thread_pool_push (tsched->pool, task, NULL);
|
||||
break;
|
||||
case GST_TASK_PAUSED:
|
||||
|
@ -271,8 +273,6 @@ gst_thread_scheduler_func (GstThreadSchedulerTask * ttask,
|
|||
{
|
||||
GstTask *task = GST_TASK (ttask);
|
||||
|
||||
gst_object_ref (GST_OBJECT (task));
|
||||
|
||||
GST_DEBUG_OBJECT (sched, "Entering task %p, thread %p", task,
|
||||
g_thread_self ());
|
||||
|
||||
|
|
Loading…
Reference in a new issue