* commit 'e002e3291e':
  Use the new aes/md5/sha/tree allocation functions
  avutil: Add functions for allocating opaque contexts for algorithms
  svq3: fix pointer type warning
  svq3: replace unsafe pointer casting with intreadwrite macros
  parseutils-test: various cleanups

Conflicts:
	doc/APIchanges
	libavcodec/svq3.c
	libavutil/parseutils.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-12 14:52:34 +02:00
commit f391e405df
18 changed files with 99 additions and 25 deletions

View file

@ -28,7 +28,14 @@ typedef struct AVTreeNode {
int state;
} AVTreeNode;
#if FF_API_CONTEXT_SIZE
const int av_tree_node_size = sizeof(AVTreeNode);
#endif
struct AVTreeNode *av_tree_node_alloc(void)
{
return av_mallocz(sizeof(struct AVTreeNode));
}
void *av_tree_find(const AVTreeNode *t, void *key,
int (*cmp)(void *key, const void *b), void *next[2])
@ -213,7 +220,7 @@ int main (void)
}
av_log(NULL, AV_LOG_ERROR, "inserting %4d\n", j);
if (!node)
node = av_mallocz(av_tree_node_size);
node = av_tree_node_alloc();
av_tree_insert(&root, (void *) (j + 1), cmp, &node);
j = av_lfg_get(&prng) % 86294;