omxvideoenc: fix startup race condition

The reset function shouldn't start the src pad
loop if it wasn't started before.

Signed-off-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
Christian König 2014-03-01 18:49:41 +01:00 committed by Sebastian Dröge
parent 0a8cfcde87
commit 4e4f093319

View file

@ -1340,6 +1340,9 @@ gst_omx_video_enc_reset (GstVideoEncoder * encoder, gboolean hard)
GST_DEBUG_OBJECT (self, "Resetting encoder");
if (gst_omx_component_get_state (self->enc, 0) == OMX_StateLoaded)
return TRUE;
gst_omx_port_set_flushing (self->enc_in_port, 5 * GST_SECOND, TRUE);
gst_omx_port_set_flushing (self->enc_out_port, 5 * GST_SECOND, TRUE);