v4l2videodec: don't stop if loop returned FLUSHING
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 23 May 2014 22:25:49 +0000 (18:25 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Sat, 24 May 2014 19:38:53 +0000 (15:38 -0400)
The decodeing thread returning flushing isn't an error, we should simply
try starting the task again. If it's actually flushing, it will stop again by itself.

sys/v4l2/gstv4l2videodec.c

index cc730e1..f3e03c7 100644 (file)
@@ -518,8 +518,9 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
   }
 
   if (g_atomic_int_get (&self->processing) == FALSE) {
-    /* It possible that the processing thread stopped due to an error */
-    if (self->output_flow != GST_FLOW_OK) {
+    /* It's possible that the processing thread stopped due to an error */
+    if (self->output_flow != GST_FLOW_OK &&
+        self->output_flow != GST_FLOW_FLUSHING) {
       GST_DEBUG_OBJECT (self, "Processing loop stopped with error, leaving");
       ret = self->output_flow;
       goto drop;