[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-cvs
Subject:    [1.0] gstreamer: queuearray: fix gst_queue_array_find()
From:       tpm () kemper ! freedesktop ! org (Tim Müller)
Date:       2013-01-30 11:17:36
Message-ID: 20130130111736.DECCF76A45 () kemper ! freedesktop ! org
[Download RAW message or body]

Module: gstreamer
Branch: 1.0
Commit: 0b2ccd5ff14c2f217bd0057555c63fc5925f18a3
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=0b2ccd5ff14c2f217bd0057555c63fc5925f18a3


Author: Alexander Schrab <alexas@axis.com>
Date:   Mon Jan 28 11:05:28 2013 +0100

queuearray: fix gst_queue_array_find()

https://bugzilla.gnome.org/show_bug.cgi?id=692691

---

 plugins/elements/gstqueuearray.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugins/elements/gstqueuearray.c b/plugins/elements/gstqueuearray.c
index fa4d741..174b114 100644
--- a/plugins/elements/gstqueuearray.c
+++ b/plugins/elements/gstqueuearray.c
@@ -194,8 +194,8 @@ gst_queue_array_find (GstQueueArray * array, GCompareFunc func, \
gpointer data)  guint i;
 
   /* Scan from head to tail */
-  for (i = array->head; i < array->length; i = (i + 1) % array->size)
-    if (func (array->array[i], data) == 0)
-      return i;
+  for (i = 0; i < array->length; i++)
+    if (func (array->array[(i + array->head) % array->size], data) == 0)
+      return (i + array->head) % array->size;
   return -1;
 }

_______________________________________________
gstreamer-commits mailing list
gstreamer-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic