diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-01-04 10:14:21 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-01-04 10:14:21 +0000 |
commit | 116d15ccf19813bedf5f1bb1f47a74e247963502 (patch) | |
tree | 2d71f9eddd2831b9fcfa7e9e65c958c77415fb7a | |
parent | 10ff3ff43b4c23410218497af3f1d7f8c8bb60e0 (diff) | |
download | ffmpeg-116d15ccf19813bedf5f1bb1f47a74e247963502.tar.gz |
Always set next correctly, even if a matching element is found (that is
how it is documented and used).
Originally committed as revision 11391 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavutil/tree.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/tree.c b/libavutil/tree.c index f4b9af1945..6126ffaaa4 100644 --- a/libavutil/tree.c +++ b/libavutil/tree.c @@ -35,6 +35,10 @@ void *av_tree_find(const AVTreeNode *t, void *key, int (*cmp)(void *key, const v if(next) next[(v>>31)^1]= t->elem; return av_tree_find(t->child[v>>31], key, cmp, next); }else{ + if(next){ + av_tree_find(t->child[0], key, cmp, next); + av_tree_find(t->child[1], key, cmp, next); + } return t->elem; } } |