Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> --- libavutil/tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavutil/tree.c b/libavutil/tree.c index a4c090e6d04..09c55f6752d 100644 --- a/libavutil/tree.c +++ b/libavutil/tree.c @@ -40,16 +40,16 @@ struct AVTreeNode *av_tree_node_alloc(void) static void tree_find_next(const AVTreeNode *t, const void *key, int (*cmp)(const void *key, const void *b), void *next[4], int nextlen, int direction) { - if (t) { + while (t) { unsigned int v = cmp(key, t->elem); if (v) { next[direction] = t->elem; av_assert2((v >> 31) == direction); - tree_find_next(t->child[!direction], key, cmp, next, nextlen, direction); + t = t->child[!direction]; } else { if (nextlen >= 4) next[2+direction] = t->elem; - tree_find_next(t->child[direction], key, cmp, next, nextlen, direction); + t = t->child[direction]; } } } -- 2.49.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".