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
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
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);