GST_INFO (GST_CAT_COTHREADS, "destroy cothread %d %p %d", threadnum, thread, ctx->current);
+ /* we have to unlock here because we might be switched out with the lock held */
+ cothread_unlock (thread);
+
#ifndef COTHREAD_ATOMIC
- g_mutex_unlock (thread->lock);
g_mutex_free (thread->lock);
#endif
#ifdef GST_ARCH_PRESETJMP
GST_ARCH_PRESETJMP ();
#endif
- enter = sigsetjmp (current->jmp, 1);
+ enter = setjmp (current->jmp);
if (enter != 0) {
GST_DEBUG (0, "enter thread #%d %d %p<->%p (%d)\n", current->threadnum, enter,
current->sp, current->top_sp, (char*)current->top_sp - (char*)current->sp);
if (thread->flags & COTHREAD_STARTED) {
GST_DEBUG (0, "in thread \n");
/* switch to it */
- siglongjmp (thread->jmp, 1);
+ longjmp (thread->jmp, 1);
}
else {
GST_ARCH_SETUP_STACK ((char*)thread->sp);
void
gst_event_free (GstEvent* event)
{
+ GST_INFO (GST_CAT_EVENT, "freeing event %p", event);
+
g_mutex_lock (_gst_event_chunk_lock);
if (GST_EVENT_SRC (event)) {
gst_object_unref (GST_EVENT_SRC (event));
pads = g_list_next (pads);
}
}
+ gst_event_free (event);
/* we have to try to schedule another element because this one is deisabled */
gst_element_yield (element);
break;
default:
g_warning ("no default handler for event\n");
+ gst_event_free (event);
break;
}
- gst_event_free (event);
}
/**