aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2010-03-03 17:31:24 +0000
committerVitor Sessak <vitor1001@gmail.com>2010-03-03 17:31:24 +0000
commit4b83fc0fe414dc7959a5511fcdce320ad90ac7ba (patch)
tree649182f9e748b1e89ee8ca694bb0a1be09972e3c /libavutil
parent1f6d0d42c53cde5e33e92c4529b774c256157f89 (diff)
downloadffmpeg-4b83fc0fe414dc7959a5511fcdce320ad90ac7ba.tar.gz
Plug memory leak in NUT muxer and demuxer
Originally committed as revision 22174 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/avutil.h2
-rw-r--r--libavutil/tree.c2
-rw-r--r--libavutil/tree.h13
3 files changed, 14 insertions, 3 deletions
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index b56f0ed4c2..b026046b36 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -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, \
diff --git a/libavutil/tree.c b/libavutil/tree.c
index 4b78764628..c387c46deb 100644
--- a/libavutil/tree.c
+++ b/libavutil/tree.c
@@ -135,7 +135,6 @@ 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;
@@ -144,7 +143,6 @@ void av_tree_enumerate(AVTreeNode *t, void *opaque, int (*cmp)(void *opaque, voi
if(v<=0) av_tree_enumerate(t->child[1], opaque, cmp, enu);
}
}
-#endif
#ifdef TEST
diff --git a/libavutil/tree.h b/libavutil/tree.h
index e96d1fa12e..75191f4f7e 100644
--- a/libavutil/tree.h
+++ b/libavutil/tree.h
@@ -79,4 +79,17 @@ void *av_tree_find(const struct AVTreeNode *root, void *key, int (*cmp)(void *ke
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 */