{
GST_DEBUG_OBJECT (bin, "freeing session %p", sess);
+ gst_element_set_locked_state (sess->demux, TRUE);
+ gst_element_set_locked_state (sess->session, TRUE);
+
gst_element_set_state (sess->demux, GST_STATE_NULL);
gst_element_set_state (sess->session, GST_STATE_NULL);
g_signal_handler_disconnect (stream->buffer, stream->buffer_ptreq_sig);
g_signal_handler_disconnect (stream->buffer, stream->buffer_ntpstop_sig);
+ gst_element_set_locked_state (stream->demux, TRUE);
+ gst_element_set_locked_state (stream->buffer, TRUE);
+
gst_element_set_state (stream->demux, GST_STATE_NULL);
gst_element_set_state (stream->buffer, GST_STATE_NULL);