Commit 5a7c1b56 authored by Alexander Schrab's avatar Alexander Schrab Committed by Tim-Philipp Müller

queuearray: fix gst_queue_array_find()

https://bugzilla.gnome.org/show_bug.cgi?id=692691
parent af8ff1be
......@@ -303,9 +303,9 @@ 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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment