Commit 1bf83b95 authored by Michael Niedermayer's avatar Michael Niedermayer

Make sure av_tree_enumerate() enumerates left->right.

Originally committed as revision 20535 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 93d38cf6
...@@ -136,10 +136,11 @@ void av_tree_destroy(AVTreeNode *t){ ...@@ -136,10 +136,11 @@ void av_tree_destroy(AVTreeNode *t){
} }
#if 0 #if 0
void av_tree_enumerate(AVTreeNode *t, void *opaque, int (*f)(void *opaque, void *elem)){ void av_tree_enumerate(AVTreeNode *t, void *opaque, int (*cmp)(void *opaque, void *elem), int (*enu)(void *opaque, void *elem)){
int v= f(opaque, t->elem); int v= cmp ? cmp(opaque, t->elem) : 0;
if(v>=0) av_tree_enumerate(t->child[0], opaque, f); if(v>=0) av_tree_enumerate(t->child[0], opaque, cmp, enu);
if(v<=0) av_tree_enumerate(t->child[1], opaque, f); if(v==0) enu(opaque, t->elem);
if(v<=0) av_tree_enumerate(t->child[1], opaque, cmp, enu);
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment