omxvideodec: First set ports to flushing before waiting for the srcpad streaming...
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 18 Nov 2011 17:58:58 +0000 (09:58 -0800)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 18 Nov 2011 17:58:58 +0000 (09:58 -0800)
omx/gstomxvideodec.c

index e4fa677..07a278f 100644 (file)
@@ -917,6 +917,9 @@ gst_omx_video_dec_stop (GstBaseVideoDecoder * decoder)
 
   GST_DEBUG_OBJECT (self, "Stopping decoder");
 
+  gst_omx_port_set_flushing (self->in_port, TRUE);
+  gst_omx_port_set_flushing (self->out_port, TRUE);
+
   gst_pad_stop_task (GST_BASE_VIDEO_CODEC_SRC_PAD (decoder));
 
   if (gst_omx_component_get_state (self->component, 0) > OMX_StateIdle)
@@ -931,9 +934,6 @@ gst_omx_video_dec_stop (GstBaseVideoDecoder * decoder)
   g_cond_broadcast (self->drain_cond);
   g_mutex_unlock (self->drain_lock);
 
-  gst_omx_port_set_flushing (self->in_port, TRUE);
-  gst_omx_port_set_flushing (self->out_port, TRUE);
-
   gst_omx_component_get_state (self->component, 5 * GST_SECOND);
 
   gst_buffer_replace (&self->codec_data, NULL);