diff options
author | Zdenek Kabelac <kabi@informatics.muni.cz> | 2002-12-03 19:40:35 +0000 |
---|---|---|
committer | Zdenek Kabelac <kabi@informatics.muni.cz> | 2002-12-03 19:40:35 +0000 |
commit | 855ea723b0ea450137e54674179751c14e8fc6b5 (patch) | |
tree | e8c81d27ce40b9c8f4f064cf06b464e26fed4d09 /libavcodec/avcodec.h | |
parent | 17308326396778cd31451ef7a69c36c7ccb7cab7 (diff) | |
download | ffmpeg-855ea723b0ea450137e54674179751c14e8fc6b5.tar.gz |
* two functions to handle allocation of static data more simple
av_mallocz_static - called for every static data table
av_free_static - called when ffmpeg is no longer needed and should free
all static resources
* simple usage shown in mpegaudiodec.c
Originally committed as revision 1301 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 963e5f100a..7bfdc99a27 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1061,5 +1061,10 @@ void *av_mallocz(unsigned int size); void av_free(void *ptr); void __av_freep(void **ptr); #define av_freep(p) __av_freep((void **)(p)) +/* for static data only */ +/* call av_free_static to release all staticaly allocated tables */ +void av_free_static(); +void *__av_mallocz_static(void** location, unsigned int size); +#define av_mallocz_static(p, s) __av_mallocz_static((void **)(p), s) #endif /* AVCODEC_H */ |