Should only access the object structure after checking
it's valid in gst_task_join().
https://bugzilla.gnome.org/show_bug.cgi?id=746385
https://bugzilla.gnome.org/show_bug.cgi?id=746431
void
gst_task_set_lock (GstTask * task, GRecMutex * mutex)
{
+ g_return_if_fail (GST_IS_TASK (task));
+
GST_OBJECT_LOCK (task);
if (G_UNLIKELY (task->running))
goto is_running;
gpointer id;
GstTaskPool *pool = NULL;
- priv = task->priv;
-
g_return_val_if_fail (GST_IS_TASK (task), FALSE);
+ priv = task->priv;
+
tself = g_thread_self ();
GST_DEBUG_OBJECT (task, "Joining task %p, thread %p", task, tself);