summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.com>2012-02-16 16:30:02 -0300
committerThiago Santos <thiago.sousa.santos@collabora.com>2012-02-16 22:51:21 -0300
commit39bad1d6ca2600eb9d2ad46e3842b8a564cf6c43 (patch)
treeb647dccc4c33fd290d06e4af50347c7deeeddd12
parent2ce709cf4a4d46b058218a965885cecfa1568b1f (diff)
wrappercamerabinsrc: Put source to null when resetting caps
It seems that v4l2src isn't happy when switching formats on ready state, it works when putting it to NULL. Keep this workaround in wrappercamerabinsrc while v4l2src isn't fixed. Fixes #849832
-rw-r--r--gst/camerabin2/gstwrappercamerabinsrc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c
index 944cd2c2e..03f775f92 100644
--- a/gst/camerabin2/gstwrappercamerabinsrc.c
+++ b/gst/camerabin2/gstwrappercamerabinsrc.c
@@ -156,7 +156,13 @@ gst_wrapper_camera_bin_reset_video_src_caps (GstWrapperCameraBinSrc * self,
clock = gst_element_get_clock (self->src_vid_src);
base_time = gst_element_get_base_time (self->src_vid_src);
- gst_element_set_state (self->src_vid_src, GST_STATE_READY);
+ /* Ideally, we should only need to get the source to READY here,
+ * but it seems v4l2src isn't happy with this. Putting to NULL makes
+ * it work.
+ *
+ * TODO fix this in v4l2src
+ */
+ gst_element_set_state (self->src_vid_src, GST_STATE_NULL);
set_capsfilter_caps (self, caps);
self->drop_newseg = TRUE;