[gst-devel] set_element_set_state & multi thread safe

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Jan 5 14:27:33 CET 2010


On Tue, 2010-01-05 at 13:42 +0100, franchan wrote:

Hi,

> When I receive a buffering message,
> I call gst_element_set_state(PAUSED)
> from my synchronous message callback.
> If just before the event is received,
> the gst_element_set_state(NULL) is invoked
> (because the user wants to quit the player),
> I then seem to get locked on a GST_STATE_LOCK(element).
> The application appears to be blocked forever.
> Am I doing this the wrong way?

You are not allowed to call _set_state() from a streaming thread, so you
can't use it in a synchronous message callback.

 Cheers
  -Tim





More information about the gstreamer-devel mailing list