omxvideodec: 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:48:17 +01:00 committed by Sebastian Dröge
parent 289ecfe35c
commit 0a8cfcde87

View file

@ -2735,6 +2735,9 @@ gst_omx_video_dec_reset (GstVideoDecoder * decoder, gboolean hard)
GST_DEBUG_OBJECT (self, "Resetting decoder"); GST_DEBUG_OBJECT (self, "Resetting decoder");
if (gst_omx_component_get_state (self->dec, 0) == OMX_StateLoaded)
return TRUE;
gst_omx_port_set_flushing (self->dec_in_port, 5 * GST_SECOND, TRUE); gst_omx_port_set_flushing (self->dec_in_port, 5 * GST_SECOND, TRUE);
gst_omx_port_set_flushing (self->dec_out_port, 5 * GST_SECOND, TRUE); gst_omx_port_set_flushing (self->dec_out_port, 5 * GST_SECOND, TRUE);