diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-01-04 18:58:36 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-01-04 18:58:36 +0000 |
commit | 2e1d2873294a826f673921c0dc5b31f6a6fbbeaa (patch) | |
tree | a93412459aafdf0bff79528eb535020437c44678 /libavutil | |
parent | b57cb96836f3be748f22643c47d9aae40ddf4c79 (diff) | |
download | ffmpeg-2e1d2873294a826f673921c0dc5b31f6a6fbbeaa.tar.gz |
Flip key and element so types match, not that it matters for any code
using it in libav*.
Originally committed as revision 11404 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/tree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavutil/tree.c b/libavutil/tree.c index cc366769e5..b821802bc0 100644 --- a/libavutil/tree.c +++ b/libavutil/tree.c @@ -32,10 +32,10 @@ const int av_tree_node_size = sizeof(AVTreeNode); void *av_tree_find(const AVTreeNode *t, void *key, int (*cmp)(void *key, const void *b), void *next[2]){ if(t){ - unsigned int v= cmp(t->elem, key); + unsigned int v= cmp(key, t->elem); if(v){ - if(next) next[(v>>31)^1]= t->elem; - return av_tree_find(t->child[v>>31], key, cmp, next); + if(next) next[v>>31]= t->elem; + return av_tree_find(t->child[(v>>31)^1], key, cmp, next); }else{ if(next){ av_tree_find(t->child[0], key, cmp, next); |