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.
This commit is contained in:
Thiago Santos 2011-03-09 14:53:26 -03:00
parent 42ade52136
commit 3d1a7b0021

View file

@ -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