summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2010-02-18 17:15:35 +0100
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2010-02-18 17:17:34 +0100
commit2aea9ad231a6b3e9e8846d7e4fde098c5e15af70 (patch)
tree8f91265867802f53f2f15ee7f0e295b86fe47730
parent1d7afbd0f2685bde898bdac91840fd6a8f3326ad (diff)
memindex: avoid busy loop when doing EXACT lookup
Fixes #610367.
-rw-r--r--plugins/indexers/gstmemindex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/indexers/gstmemindex.c b/plugins/indexers/gstmemindex.c
index 8cf5a38789..2ea08222ca 100644
--- a/plugins/indexers/gstmemindex.c
+++ b/plugins/indexers/gstmemindex.c
@@ -421,8 +421,8 @@ gst_mem_index_get_assoc_entry (GstIndex * index, gint id,
}
}
- if (entry) {
- if ((GST_INDEX_ASSOC_FLAGS (entry) & flags) != flags) {
+ if (entry && ((GST_INDEX_ASSOC_FLAGS (entry) & flags) != flags)) {
+ if (method != GST_INDEX_LOOKUP_EXACT) {
GList *l_entry = g_list_find (memindex->associations, entry);
entry = NULL;
@@ -439,6 +439,8 @@ gst_mem_index_get_assoc_entry (GstIndex * index, gint id,
l_entry = g_list_previous (l_entry);
}
}
+ } else {
+ entry = NULL;
}
}