diff --git a/ChangeLog b/ChangeLog index e3e581c739..a785bf5353 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-05-22 Wim Taymans + + Patch by: Sjoerd Simons + + * gst/playback/gstdecodebin.c: (remove_fakesink): + Lock the fakesink before setting the state to NULL and removing it from + the bin so that a concurrent state change cannot interfere. + Fixes #534331. + 2008-05-21 Felipe Contreras * docs/Makefile.am: diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index 0f2e8dd79d..de754bd8c2 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -634,6 +634,9 @@ remove_fakesink (GstDecodeBin * decode_bin) if (decode_bin->fakesink) { GST_DEBUG_OBJECT (decode_bin, "Removing fakesink and marking state dirty"); + /* Lock the state to prevent it from changing state to non-NULL + * before it's removed */ + gst_element_set_locked_state (decode_bin->fakesink, TRUE); /* setting the state to NULL is never async */ gst_element_set_state (decode_bin->fakesink, GST_STATE_NULL); gst_bin_remove (GST_BIN (decode_bin), decode_bin->fakesink);