State changes to GST_STATE_NULL not being communicated.

Tim-Philipp Müller t.i.m at
Mon Apr 1 09:39:09 PDT 2013

On Mon, 2013-04-01 at 20:41 +0530, Yogesh Marwaha wrote:


> Just re-wording my problem once again (keeping it simple - perhaps).
> When I try to set playbin (playing a local file) to GST_STATE_NULL, playback 
> stops[1] but no communication (i.e. GST_MESSAGE_STATE_CHANGED message) 
> regarding change of state is received by the watch (on the playbin).
>  (snip)
> I'm using gstreamer/gstreamer-plugins-base 1.0.6.
> Any idea about this?

This is expected behaviour (both in 0.10 and 1.0).

When you set the pipeline state to NULL, the pipeline bus will be set
flushing and all messages will be discarded. This is done because of
potential reference cycle issues (messages hold a ref to the element
that posted them).

You can disable that behaviour via GstPipeline API
(auto-flush-bus=false), but then you'll always have to make sure to pop
all pending messages off the bus yourself.


More information about the gstreamer-devel mailing list