diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-11-14 01:06:15 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-11-14 01:06:15 +0000 |
commit | 3320687691fd65f50c61e9e67334a8f15da29eeb (patch) | |
tree | d56eb9b4232b39870aea352b8b8fab2133ca499b | |
parent | 8cb976931a9f85472ce595d77e5bd459f25e8817 (diff) | |
download | ffmpeg-3320687691fd65f50c61e9e67334a8f15da29eeb.tar.gz |
improve enumerate so arbitrary ranges can be enumerated quickly
Originally committed as revision 7033 to svn://svn.ffmpeg.org/ffmpeg/trunk
-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 aff749e791..f0a9145ce1 100644 --- a/libavutil/tree.c +++ b/libavutil/tree.c @@ -93,9 +93,9 @@ void av_tree_destroy(AVTreeNode *t){ #if 0 void av_tree_enumerate(AVTreeNode *t, void *opaque, int (*f)(void *opaque, void *elem)){ - f(opaque, t->elem); - av_tree_enumerate(t->child[0], opaque, f); - av_tree_enumerate(t->child[1], opaque, f); + int v= f(opaque, t->elem); + if(v>=0) av_tree_enumerate(t->child[0], opaque, f); + if(v<=0) av_tree_enumerate(t->child[1], opaque, f); } #endif |