[0.10] gst-plugins-bad: wrappercamerabinsrc: Put source to null when resetting caps

Tim Müller tpm at kemper.freedesktop.org
Mon Feb 20 18:22:16 PST 2012


Module: gst-plugins-bad
Branch: 0.10
Commit: 6de148a742ddf54cd3c1ff9a5853db13164115df
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=6de148a742ddf54cd3c1ff9a5853db13164115df

Author: Thiago Santos <thiago.sousa.santos at collabora.com>
Date:   Thu Feb 16 16:30:02 2012 -0300

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

---

 gst/camerabin2/gstwrappercamerabinsrc.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c
index b519ba3..e1d481d 100644
--- a/gst/camerabin2/gstwrappercamerabinsrc.c
+++ b/gst/camerabin2/gstwrappercamerabinsrc.c
@@ -152,7 +152,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;



More information about the gstreamer-commits mailing list