camerabin: Processing should stop on READY

The videobin and imagebin from camerabin have their states
locked and aren't put to READY when all the rest of camerabin
is set to it.

This might cause one of them to be still processing and post
an EOS after camerabin isn't expecting it anymore, this causes
an assertion as the processing counter would already be 0 and
would be decremented.
This commit is contained in:
Thiago Santos 2011-04-01 13:39:50 -03:00
parent 7858d65b4a
commit 6a4be5a2ba

View file

@ -3834,6 +3834,12 @@ gst_camerabin_change_state (GstElement * element, GstStateChange transition)
now that actual sink has been created. */
camerabin_setup_view_elements (camera);
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
/* all processing should stop and those elements could have their state
* locked, so set them explicitly here */
gst_element_set_state (camera->imgbin, GST_STATE_READY);
gst_element_set_state (camera->vidbin, GST_STATE_READY);
break;
case GST_STATE_CHANGE_READY_TO_NULL:
gst_element_set_locked_state (camera->imgbin, FALSE);
gst_element_set_locked_state (camera->vidbin, FALSE);