omxvideoenc: Always flush the ports and make sure no processing is happening in ::reset

This fixes a race condition that happened when seeking
very often in a short period of time.
This commit is contained in:
Sebastian Dröge 2011-11-10 15:02:22 +01:00
parent e56cff5f2a
commit fbe171ee2c

View file

@ -1123,9 +1123,6 @@ gst_omx_video_enc_reset (GstBaseVideoEncoder * encoder)
g_list_free (GST_BASE_VIDEO_CODEC (self)->frames);
GST_BASE_VIDEO_CODEC (self)->frames = NULL;
if (self->started) {
self->started = FALSE;
gst_omx_port_set_flushing (self->in_port, TRUE);
gst_omx_port_set_flushing (self->out_port, TRUE);
@ -1139,7 +1136,6 @@ gst_omx_video_enc_reset (GstBaseVideoEncoder * encoder)
gst_omx_port_set_flushing (self->in_port, FALSE);
gst_omx_port_set_flushing (self->out_port, FALSE);
}
/* Start the srcpad loop again */
self->eos = FALSE;