提交 edabf359 编写于 作者: M Michael Niedermayer

Fix crash with av_tree_enumerate(NULL).

Originally committed as revision 20537 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 25c4fdda
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册