From 3d1a7b002187aaaffff45d734bdca5ffbfc154d4 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Wed, 9 Mar 2011 14:53:26 -0300 Subject: [PATCH] camerabin2: Force EOS on audio src We can't rely on audio sources pushing EOS when going PAUSED->READY because this is a basesrc bahavior and when used inside autoaudiosrc the ghostpad goes flushing before the real source pushes the EOS, so it is dropped. --- gst/camerabin2/gstcamerabin2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c index 3c335d98f9..c52e2c2296 100644 --- a/gst/camerabin2/gstcamerabin2.c +++ b/gst/camerabin2/gstcamerabin2.c @@ -228,8 +228,10 @@ gst_camera_bin_stop_capture (GstCameraBin * camerabin) if (camerabin->src) g_signal_emit_by_name (camerabin->src, "stop-capture", NULL); - if (camerabin->mode == MODE_VIDEO && camerabin->audio_src) + if (camerabin->mode == MODE_VIDEO && camerabin->audio_src) { + gst_element_send_event (camerabin->audio_src, gst_event_new_eos ()); gst_element_set_state (camerabin->audio_src, GST_STATE_NULL); + } } static void