mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-17 12:27:18 +00:00
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
This commit is contained in:
parent
10ff3ff43b
commit
116d15ccf1
@ -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;
|
if(next) next[(v>>31)^1]= t->elem;
|
||||||
return av_tree_find(t->child[v>>31], key, cmp, next);
|
return av_tree_find(t->child[v>>31], key, cmp, next);
|
||||||
}else{
|
}else{
|
||||||
|
if(next){
|
||||||
|
av_tree_find(t->child[0], key, cmp, next);
|
||||||
|
av_tree_find(t->child[1], key, cmp, next);
|
||||||
|
}
|
||||||
return t->elem;
|
return t->elem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user