mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
wrappercamerabinsrc: Put source in NULL when it fails changing state
When source is being reset to change caps, check the return of the state syncing function to avoid leaving the source in an unconsistent state.
This commit is contained in:
parent
b3592ebda8
commit
2ce709cf4a
1 changed files with 4 additions and 1 deletions
|
@ -162,7 +162,10 @@ gst_wrapper_camera_bin_reset_video_src_caps (GstWrapperCameraBinSrc * self,
|
|||
self->drop_newseg = TRUE;
|
||||
|
||||
GST_DEBUG_OBJECT (self, "Bringing source up");
|
||||
gst_element_sync_state_with_parent (self->src_vid_src);
|
||||
if (!gst_element_sync_state_with_parent (self->src_vid_src)) {
|
||||
GST_WARNING_OBJECT (self, "Failed to reset source caps");
|
||||
gst_element_set_state (self->src_vid_src, GST_STATE_NULL);
|
||||
}
|
||||
|
||||
if (clock) {
|
||||
gst_element_set_clock (self->src_vid_src, clock);
|
||||
|
|
Loading…
Reference in a new issue