mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
queuearray: fix gst_queue_array_find()
https://bugzilla.gnome.org/show_bug.cgi?id=692691
This commit is contained in:
parent
af8ff1bed8
commit
5a7c1b56dc
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue