[Bug 745516] xvimagesink: race condition causes crash in XCB

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Mar 4 02:31:10 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=745516

--- Comment #5 from Vincent Penquerc'h <vincent.penquerch at collabora.co.uk> ---
(In reply to Sebastian Dröge (slomo) from comment #4)
> Why do we need XInitThreads() for xvimagesink? Where are we using the same
> display connection from multiple threads?

Do you mean it's not supposed to ?

> The GL code does that, yes. But an application has to call XInitThreads()
> *before* using any X11 API. So also before e.g. gtk_init(). Otherwise things
> break in horrible ways. That's why we do it there conditional on an
> environment variable to opt-in.

If GTK/GDK uses X calls, it should call XInitThreads itself, no ? If any
library or program that uses X calls calls XInitThreads, then you can be sure
that it is called when needed, without a program that uses libraries that calls
X but does not itself call X directly having to call XInitThreads itself. I can
repeat that with parentheses if needed, it reads a bit confusing :)

The presence of the env var hints that calling it more than once is bad though,
but I see no mention of that in the manpage...

-- 
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