shmsink: Don't block on EOS in non-blocking mode
authorOlivier Crête <olivier.crete@collabora.co.uk>
Tue, 3 Nov 2009 21:31:37 +0000 (16:31 -0500)
committerOlivier Crête <olivier.crete@collabora.co.uk>
Thu, 3 Jun 2010 19:27:41 +0000 (15:27 -0400)
gst/shm/gstshmsink.c

index 9a0233b..2423512 100644 (file)
@@ -542,7 +542,8 @@ gst_shm_sink_event (GstBaseSink * bsink, GstEvent * event)
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_EOS:
       GST_OBJECT_LOCK (self);
-      while (sp_writer_pending_writes (self->pipe) && !self->unlock)
+      while (self->wait_for_connection && sp_writer_pending_writes (self->pipe)
+          && !self->unlock)
         g_cond_wait (self->cond, GST_OBJECT_GET_LOCK (self));
       GST_OBJECT_UNLOCK (self);
       break;