diff options
author | Thiago Santos <ts.santos@sisa.samsung.com> | 2014-07-16 18:27:15 -0300 |
---|---|---|
committer | Thiago Santos <ts.santos@sisa.samsung.com> | 2014-07-17 10:06:09 -0300 |
commit | b39c01baa1f5b40943c7a207833bb581e4530e69 (patch) | |
tree | 93f86d8efd2b3f3263f237c2dca93009ade8027e | |
parent | 1533fc7e2d0bc904c229083ef415cd8f04b57ee0 (diff) | |
download | gstreamer-plugins-bad-b39c01baa1f5b40943c7a207833bb581e4530e69.tar.gz |
wrappercamerabinsrc: set src to ready when there are no pending buffers
Setting to ready will block waiting for buffers to be reclaimed, so flush
before setting to null to make sure no buffers are pending
https://bugzilla.gnome.org/show_bug.cgi?id=733072
-rw-r--r-- | gst/camerabin2/gstwrappercamerabinsrc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c index a00785f1a..32fb38ee0 100644 --- a/gst/camerabin2/gstwrappercamerabinsrc.c +++ b/gst/camerabin2/gstwrappercamerabinsrc.c @@ -828,7 +828,6 @@ start_image_capture (GstWrapperCameraBinSrc * self) GstPad *pad, *peer; GST_DEBUG_OBJECT (self, "Starting image capture"); - gst_element_set_state (self->src_vid_src, GST_STATE_READY); /* FIXME - V4L2 source will not close the device until all buffers have came * back. Flushing the pipeline, will ensure it's properly closed, and that @@ -838,6 +837,7 @@ start_image_capture (GstWrapperCameraBinSrc * self) peer = gst_pad_get_peer (pad); gst_object_unref (pad); gst_pad_send_event (peer, gst_event_new_flush_start ()); + gst_element_set_state (self->src_vid_src, GST_STATE_READY); gst_pad_send_event (peer, gst_event_new_flush_stop (TRUE)); gst_object_unref (peer); |