diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-28 22:55:17 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-28 22:55:20 +0300 |
commit | c508fef3c737321ad719db6ec62e1d011726baa8 (patch) | |
tree | 06869cea53d7018fb7dc6a8421cd74197eaaee01 /libavcodec/rl.c | |
parent | 75647622b530e8ec98ce364c9d6c38ca1b292e6d (diff) | |
parent | 324e50ee95929a9491b855c5e15451145bd5d1ec (diff) |
Merge commit '324e50ee95929a9491b855c5e15451145bd5d1ec'
* commit '324e50ee95929a9491b855c5e15451145bd5d1ec':
rl: Add a function for freeing dynamically allocated tables.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rl.c')
-rw-r--r-- | libavcodec/rl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/rl.c b/libavcodec/rl.c index 68122b7381..8b1854c049 100644 --- a/libavcodec/rl.c +++ b/libavcodec/rl.c @@ -19,9 +19,21 @@ #include <stdint.h> #include "libavutil/attributes.h" +#include "libavutil/mem.h" #include "rl.h" +void ff_rl_free(RLTable *rl) +{ + int i; + + for (i = 0; i < 2; i++) { + av_freep(&rl->max_run[i]); + av_freep(&rl->max_level[i]); + av_freep(&rl->index_run[i]); + } +} + av_cold void ff_rl_init(RLTable *rl, uint8_t static_store[2][2 * MAX_RUN + MAX_LEVEL + 3]) { |