changeset 855:ccac021c9a8e libavutil

Plug memory leak in NUT muxer and demuxer
author vitor
date Wed, 03 Mar 2010 17:31:24 +0000
parents d6d589d11549
children f01741b79070
files avutil.h tree.c tree.h
diffstat 3 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/avutil.h	Tue Mar 02 03:16:24 2010 +0000
+++ b/avutil.h	Wed Mar 03 17:31:24 2010 +0000
@@ -40,7 +40,7 @@
 #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
 
 #define LIBAVUTIL_VERSION_MAJOR 50
-#define LIBAVUTIL_VERSION_MINOR  9
+#define LIBAVUTIL_VERSION_MINOR 10
 #define LIBAVUTIL_VERSION_MICRO  0
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
--- a/tree.c	Tue Mar 02 03:16:24 2010 +0000
+++ b/tree.c	Wed Mar 03 17:31:24 2010 +0000
@@ -135,7 +135,6 @@
     }
 }
 
-#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;
@@ -144,7 +143,6 @@
         if(v<=0) av_tree_enumerate(t->child[1], opaque, cmp, enu);
     }
 }
-#endif
 
 #ifdef TEST
 
--- a/tree.h	Tue Mar 02 03:16:24 2010 +0000
+++ b/tree.h	Wed Mar 03 17:31:24 2010 +0000
@@ -79,4 +79,17 @@
 void *av_tree_insert(struct AVTreeNode **rootp, void *key, int (*cmp)(void *key, const void *b), struct AVTreeNode **next);
 void av_tree_destroy(struct AVTreeNode *t);
 
+/**
+ * Applies enu(opaque, &elem) to all the elements in the tree in a given range.
+ *
+ * @param cmp a comparison function that returns < 0 for a element below the
+ *            range, > 0 for a element above the range and == 0 for a
+ *            element inside the range
+ *
+ * @note The cmp function should use the same ordering used to construct the
+ *       tree.
+ */
+void av_tree_enumerate(struct AVTreeNode *t, void *opaque, int (*cmp)(void *opaque, void *elem), int (*enu)(void *opaque, void *elem));
+
+
 #endif /* AVUTIL_TREE_H */