diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-05-22 19:50:13 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-05-28 15:38:43 +0100 |
commit | 324e50ee95929a9491b855c5e15451145bd5d1ec (patch) | |
tree | 69e76a6536ed3ada91c3771f087a76fb9b8acf8d /libavcodec/rl.c | |
parent | 6f57375d707de40dcec28d3cef886c364e032c21 (diff) | |
download | ffmpeg-324e50ee95929a9491b855c5e15451145bd5d1ec.tar.gz |
rl: Add a function for freeing dynamically allocated tables.
Such tables are not used anywhere currently, but that should change.
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 942b7a6941..c0ec8ec296 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]) { |