multiqueue: check byte range even when we have timestamps
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 9 Jun 2009 11:07:34 +0000 (13:07 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 9 Jun 2009 11:08:54 +0000 (13:08 +0200)
As found by thaytan on IRC.
Also check the byte limit, even if we have timestamps because there might just
not be a time limit.

plugins/elements/gstmultiqueue.c

index 291f136..30f9865 100644 (file)
@@ -1385,13 +1385,9 @@ single_queue_check_full (GstDataQueue * dataq, guint visible, guint bytes,
   if (IS_FILLED (visible, visible))
     return TRUE;
 
-  if (sq->cur_time != 0) {
-    /* if we have valid time in the queue, check */
-    res = IS_FILLED (time, sq->cur_time);
-  } else {
-    /* no valid time, check bytes */
-    res = IS_FILLED (bytes, bytes);
-  }
+  /* check time or bytes */
+  res = IS_FILLED (time, sq->cur_time) || IS_FILLED (bytes, bytes);
+
   return res;
 }