From 298af589eb592fa2ed453318c18424fc70fc2659 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Tue, 2 Aug 2011 10:49:09 -0300 Subject: [PATCH] camerabin2: Workaround for ringbuffer not resyncing on READY Add a workaround to fix timestamps meanwhile bug https://bugzilla.gnome.org/show_bug.cgi?id=648359 is fixed. --- gst/camerabin2/gstcamerabin2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c index 522d974aa6..ba6a926c62 100644 --- a/gst/camerabin2/gstcamerabin2.c +++ b/gst/camerabin2/gstcamerabin2.c @@ -272,7 +272,11 @@ gst_camera_bin_start_capture (GstCameraBin2 * camerabin) if (camerabin->audio_src) { GstClock *clock = gst_pipeline_get_clock (GST_PIPELINE_CAST (camerabin)); - gst_element_set_state (camerabin->audio_src, GST_STATE_READY); + /* FIXME We need to set audiosrc to null to make it resync the ringbuffer + * while bug https://bugzilla.gnome.org/show_bug.cgi?id=648359 isn't + * fixed */ + gst_element_set_state (camerabin->audio_src, GST_STATE_NULL); + /* need to reset eos status (pads could be flushing) */ gst_element_set_state (camerabin->audio_capsfilter, GST_STATE_READY); gst_element_set_state (camerabin->audio_volume, GST_STATE_READY);