basecamerasrc: Set preview pipeline to ready when going to ready

The preview pipeline should go to ready when the camerasrc goes
to ready, as in ready elements shouldn't be processing data.
This commit is contained in:
Thiago Santos 2011-10-11 23:30:49 -03:00
parent e90e041e52
commit acdd2c20f7

View file

@ -474,6 +474,9 @@ gst_base_camera_src_change_state (GstElement * element,
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_element_set_state (self->preview_pipeline->pipeline, GST_STATE_READY);
break;
case GST_STATE_CHANGE_READY_TO_NULL:
gst_element_set_state (self->preview_pipeline->pipeline, GST_STATE_NULL);
break;