mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 01:28:34 +00:00
wrappercamerabinsrc: Do not re-set the clock if it is null
Avoids not needed work and doesn't assert when trying to unref the null reference
This commit is contained in:
parent
ab2b9079f0
commit
15366355a4
1 changed files with 27 additions and 24 deletions
|
@ -185,34 +185,37 @@ gst_wrapper_camera_bin_reset_video_src_caps (GstWrapperCameraBinSrc * self,
|
||||||
GST_DEBUG_OBJECT (self, "Bringing source up");
|
GST_DEBUG_OBJECT (self, "Bringing source up");
|
||||||
gst_element_sync_state_with_parent (self->src_vid_src);
|
gst_element_sync_state_with_parent (self->src_vid_src);
|
||||||
|
|
||||||
gst_element_set_clock (self->src_vid_src, clock);
|
if (clock) {
|
||||||
gst_element_set_base_time (self->src_vid_src, base_time);
|
gst_element_set_clock (self->src_vid_src, clock);
|
||||||
|
gst_element_set_base_time (self->src_vid_src, base_time);
|
||||||
|
|
||||||
if (GST_IS_BIN (self->src_vid_src)) {
|
if (GST_IS_BIN (self->src_vid_src)) {
|
||||||
GstIterator *it = gst_bin_iterate_elements (GST_BIN (self->src_vid_src));
|
GstIterator *it =
|
||||||
gpointer item = NULL;
|
gst_bin_iterate_elements (GST_BIN (self->src_vid_src));
|
||||||
gboolean done = FALSE;
|
gpointer item = NULL;
|
||||||
while (!done) {
|
gboolean done = FALSE;
|
||||||
switch (gst_iterator_next (it, &item)) {
|
while (!done) {
|
||||||
case GST_ITERATOR_OK:
|
switch (gst_iterator_next (it, &item)) {
|
||||||
gst_element_set_base_time (GST_ELEMENT (item), base_time);
|
case GST_ITERATOR_OK:
|
||||||
gst_object_unref (item);
|
gst_element_set_base_time (GST_ELEMENT (item), base_time);
|
||||||
break;
|
gst_object_unref (item);
|
||||||
case GST_ITERATOR_RESYNC:
|
break;
|
||||||
gst_iterator_resync (it);
|
case GST_ITERATOR_RESYNC:
|
||||||
break;
|
gst_iterator_resync (it);
|
||||||
case GST_ITERATOR_ERROR:
|
break;
|
||||||
done = TRUE;
|
case GST_ITERATOR_ERROR:
|
||||||
break;
|
done = TRUE;
|
||||||
case GST_ITERATOR_DONE:
|
break;
|
||||||
done = TRUE;
|
case GST_ITERATOR_DONE:
|
||||||
break;
|
done = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
gst_iterator_free (it);
|
||||||
}
|
}
|
||||||
gst_iterator_free (it);
|
|
||||||
}
|
|
||||||
|
|
||||||
gst_object_unref (clock);
|
gst_object_unref (clock);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue