[Bug 755554] gtk: Wait at most 5s for calling something on the main thread
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu Sep 24 12:21:52 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=755554
--- Comment #5 from Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> ---
(In reply to Sebastian Dröge (slomo) from comment #3)
> > @@ +52,3 @@
> > + g_mutex_clear (&info->lock);
> > + g_cond_clear (&info->cond);
> > + g_free (info);
> >
> > Using g_main_context_invoke_full() with a destroy notify would avoid the
> > duplication.
>
> No, because otherwise the struct is already freed after
> g_main_context_invoke() while we still want to get the result from it.
>
That is not correct. If you use a GDestroyNotify to free the structure (and
correctly remove the two duplicate free blocks), the data will be destroy when
gst_gtk_invoke_func () returns or if the main loop get destroyed without
running the callback. You can also safely call g_source_remove() after a
timeout to cleanup the callback if not run yet.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list