Revision 8a4d067d

View differences:

libavformat/nutdec.c
901 901

  
902 902
    av_freep(&nut->time_base);
903 903
    av_freep(&nut->stream);
904
    av_tree_destroy_free_elem(nut->syncpoints);
905 904
    for(i = 1; i < nut->header_count; i++)
906 905
        av_freep(&nut->header[i]);
907 906

  
libavformat/nutenc.c
799 799
    put_flush_packet(bc);
800 800
    av_freep(&nut->stream);
801 801
    av_freep(&nut->time_base);
802
    av_tree_destroy_free_elem(nut->syncpoints);
803 802

  
804 803
    return 0;
805 804
}
libavutil/tree.c
135 135
    }
136 136
}
137 137

  
138
void av_tree_destroy_free_elem(AVTreeNode *t){
139
    if(t){
140
        av_tree_destroy_free_elem(t->child[0]);
141
        av_tree_destroy_free_elem(t->child[1]);
142
        av_free(t->elem);
143
        av_free(t);
144
    }
145
}
146

  
147 138
#if 0
148 139
void av_tree_enumerate(AVTreeNode *t, void *opaque, int (*cmp)(void *opaque, void *elem), int (*enu)(void *opaque, void *elem)){
149 140
    if(t){
libavutil/tree.h
78 78
 */
79 79
void *av_tree_insert(struct AVTreeNode **rootp, void *key, int (*cmp)(void *key, const void *b), struct AVTreeNode **next);
80 80
void av_tree_destroy(struct AVTreeNode *t);
81
void av_tree_destroy_free_elem(struct AVTreeNode *t);
82 81

  
83 82
#endif /* AVUTIL_TREE_H */

Also available in: Unified diff