Michael Niedermayer
b326438139
avutil/tree: fix memleaks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
c2e936de07
tree-test: Refactor and plug memory leaks
...
With the most annoying memory leak found by Derek Buitenhuis.
11 years ago
Michael Niedermayer
db75537e25
avutil/tree: allow adjusting the log level
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
647836608c
avutil/tree: change debug output to AV_LOG_DEBUG level
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
d99a2b6d0a
avutil/tree: Drop debug messages that clutter the output
11 years ago
Diego Biurrun
10db1a9bca
avutil/tree: K&R formatting cosmetics
11 years ago
Michael Niedermayer
6c49562d79
tree-test: fix printf() types
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
977cb54f94
tree: fix type used for testing the tree
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ac090fa68c
lavu: keep context size variables
...
They are essential to be able to use the utils without av_malloc()
That is for example use with malloc(), memalign(), some other
private allocation function, on the stack or others.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
e002e3291e
Use the new aes/md5/sha/tree allocation functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
9a92aea27b
avutil: Add functions for allocating opaque contexts for algorithms
...
The current API where the plain size is exposed is not of much
use - in most cases it is allocated dynamically anyway.
If allocated e.g. on the stack via an uint8_t array, there's no
guarantee that the struct's members are aligned properly (unless
the array is overallocated and the opaque pointer within it
manually aligned to some unspecified alignment).
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Yordan Makariev
425b45d4b0
Code clean-up for crc.c, lfg.c, log.c, random_see.d, rational.c and tree.c.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Måns Rullgård
2ed6f39944
Replace many includes of libavutil/common.h with what is actually needed
...
This reduces the number of false dependencies on header files and
speeds up compilation.
Originally committed as revision 22407 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Vitor Sessak
4b83fc0fe4
Plug memory leak in NUT muxer and demuxer
...
Originally committed as revision 22174 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Vitor Sessak
8a4d067dfc
Revert r22119 and partially revert 22120.
...
Originally committed as revision 22135 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Vitor Sessak
fee6faa2b6
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
15 years ago
Michael Niedermayer
b154ed5abe
Fix indention after last commit.
...
Originally committed as revision 20538 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Michael Niedermayer
edabf35926
Fix crash with av_tree_enumerate(NULL).
...
Originally committed as revision 20537 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Michael Niedermayer
1bf83b9548
Make sure av_tree_enumerate() enumerates left->right.
...
Originally committed as revision 20535 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Diego Biurrun
64bde1974b
cosmetics: Rename prn variable to prng (Pseudo Random Number Generator).
...
Originally committed as revision 18422 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Benoit Fouet
168fffdf01
Fix warnings in tree.c test code.
...
Originally committed as revision 18267 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
504ffed19f
Mark non-exported functions in test and example programs as static.
...
Originally committed as revision 18259 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
294eaa2643
Replace random() usage in test programs by av_lfg_*().
...
Originally committed as revision 18070 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
89c9ff504b
spelling/grammar/consistency review part I
...
Originally committed as revision 16840 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Aurelien Jacobs
045cbba92d
cosmetic: indent
...
Originally committed as revision 16423 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Aurelien Jacobs
d8bd113ef4
add a termination condition
...
Originally committed as revision 16422 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
eed3607564
Avoid undefined behavior for removing elements that were not in the tree.
...
Originally committed as revision 15368 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
51198a8737
Comment to explain how the add/remove core works.
...
Originally committed as revision 11603 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
5d1e3d2210
Print removing of nodes in the test code.
...
Originally committed as revision 11534 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
3f161c7eab
simplify
...
Originally committed as revision 11533 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Diego Biurrun
a005768d25
Remove unused variable j.
...
Originally committed as revision 11472 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
a35bf971c6
indent
...
Originally committed as revision 11405 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
2e1d287329
Flip key and element so types match, not that it matters for any code
...
using it in libav*.
Originally committed as revision 11404 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
d5cb5fe86b
Fix selftest.
...
Originally committed as revision 11401 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
f05dda3b7a
Support removing elements.
...
Originally committed as revision 11400 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
6e8b982bcc
Move *malloc() out of tree.c, that way the code can be used with
...
flat arrays which have lower overhead than millions of mallocd() elements.
Originally committed as revision 11399 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
116d15ccf1
Always set next correctly, even if a matching element is found (that is
...
how it is documented and used).
Originally committed as revision 11391 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Diego Biurrun
f8a80fd69d
main() --> main(void)
...
Originally committed as revision 11079 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
eaaa48b29e
0.5l
...
Originally committed as revision 7052 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Michael Niedermayer
3320687691
improve enumerate so arbitrary ranges can be enumerated quickly
...
Originally committed as revision 7033 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Michael Niedermayer
9eb88fdeba
AVL tree
...
Originally committed as revision 7031 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago