multiudpsink: Return FLUSHING instead of ERROR on unlock
authorOlivier Crête <olivier.crete@collabora.com>
Tue, 7 Aug 2012 18:14:21 +0000 (11:14 -0700)
committerOlivier Crête <olivier.crete@collabora.com>
Tue, 7 Aug 2012 18:31:32 +0000 (11:31 -0700)
If the base class asks multiudpsink to unlock, then it should return
FLUSHING, not ERROR

gst/udp/gstmultiudpsink.c

index dee3459..8db4db9 100644 (file)
@@ -537,10 +537,16 @@ no_data:
   }
 send_error:
   {
+    GstFlowReturn res = GST_FLOW_ERROR;
+
     g_mutex_unlock (&sink->client_lock);
     GST_DEBUG ("got send error %s", err->message);
+
+    if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+      res = GST_FLOW_FLUSHING;
+
     g_clear_error (&err);
-    return GST_FLOW_ERROR;
+    return res;
   }
 }