OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25c4fdd
)
Fix crash with av_tree_enumerate(NULL).
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 14 Nov 2009 19:14:14 +0000
(19:14 +0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 14 Nov 2009 19:14:14 +0000
(19:14 +0000)
Originally committed as revision 20537 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavutil/tree.c
patch
|
blob
|
history
diff --git
a/libavutil/tree.c
b/libavutil/tree.c
index
0781453
..
85ef629
100644
(file)
--- a/
libavutil/tree.c
+++ b/
libavutil/tree.c
@@
-137,10
+137,12
@@
void av_tree_destroy(AVTreeNode *t){
#if 0
void av_tree_enumerate(AVTreeNode *t, void *opaque, int (*cmp)(void *opaque, void *elem), int (*enu)(void *opaque, void *elem)){
+ if(t){
int v= cmp ? cmp(opaque, t->elem) : 0;
if(v>=0) av_tree_enumerate(t->child[0], opaque, cmp, enu);
if(v==0) enu(opaque, t->elem);
if(v<=0) av_tree_enumerate(t->child[1], opaque, cmp, enu);
+ }
}
#endif