mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
Implement av_tree_destroy_free_elem() to destroy a tree and free all the
values stored on it. Originally committed as revision 22119 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -135,6 +135,15 @@ void av_tree_destroy(AVTreeNode *t){
|
||||
}
|
||||
}
|
||||
|
||||
void av_tree_destroy_free_elem(AVTreeNode *t){
|
||||
if(t){
|
||||
av_tree_destroy_free_elem(t->child[0]);
|
||||
av_tree_destroy_free_elem(t->child[1]);
|
||||
av_free(t->elem);
|
||||
av_free(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){
|
||||
|
||||
Reference in New Issue
Block a user