Signed-off-by: Michael Niedermayer <[email protected]>
---
libavutil/tree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavutil/tree.c b/libavutil/tree.c
index 455a447bf11..a4c090e6d04 100644
--- a/libavutil/tree.c
+++ b/libavutil/tree.c
@@ -57,12 +57,12 @@ static void tree_find_next(const AVTreeNode *t, const void
*key,
void *av_tree_find2(const AVTreeNode *t, const void *key,
int (*cmp)(const void *key, const void *b), void *next[4],
int nextlen)
{
- if (t) {
+ while(t) {
unsigned int v = cmp(key, t->elem);
if (v) {
if (next)
next[v >> 31] = t->elem;
- return av_tree_find2(t->child[(v >> 31) ^ 1], key, cmp, next,
nextlen);
+ t = t->child[(v >> 31) ^ 1];
} else {
if (next) {
tree_find_next(t->child[0], key, cmp, next, nextlen, 0);
--
2.49.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".