Skip to content
Snippets Groups Projects
Commit 0b2ccd5f authored by Alexander Schrab's avatar Alexander Schrab Committed by Tim-Philipp Müller
Browse files

queuearray: fix gst_queue_array_find()

https://bugzilla.gnome.org/show_bug.cgi?id=692691
parent a1568a30
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment