mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-13 03:24:14 +00:00
wrappercamerabinsrc: Handle state change failures
When its internal element fails to change state, don't act as if succeeded.
This commit is contained in:
parent
9863feb328
commit
3a495eaafc
1 changed files with 4 additions and 0 deletions
|
@ -942,6 +942,9 @@ gst_wrapper_camera_bin_src_change_state (GstElement * element,
|
|||
|
||||
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, trans);
|
||||
|
||||
if (ret == GST_STATE_CHANGE_FAILURE)
|
||||
goto end;
|
||||
|
||||
switch (trans) {
|
||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||
gst_element_set_state (self->preview_pipeline->pipeline, GST_STATE_NULL);
|
||||
|
@ -954,6 +957,7 @@ gst_wrapper_camera_bin_src_change_state (GstElement * element,
|
|||
break;
|
||||
}
|
||||
|
||||
end:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue