diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-04-30 17:42:58 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-04-30 17:42:58 +0000 |
commit | eea8c08fa82791378bd33769992a7435409394b7 (patch) | |
tree | 856b7010b12a81933b870227904c037b113313d7 /libavcodec/utils.c | |
parent | 60f41d13efd52488f9dc91edd047bb909d6a53c7 (diff) | |
download | ffmpeg-eea8c08fa82791378bd33769992a7435409394b7.tar.gz |
cleanup & memleak fix
Originally committed as revision 3095 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index ba4387c1c8..59e9a3058f 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -29,6 +29,8 @@ #include "mpegvideo.h" #include <stdarg.h> +static void avcodec_default_free_buffers(AVCodecContext *s); + void *av_mallocz(unsigned int size) { void *ptr; @@ -514,6 +516,7 @@ int avcodec_close(AVCodecContext *avctx) { if (avctx->codec->close) avctx->codec->close(avctx); + avcodec_default_free_buffers(avctx); av_freep(&avctx->priv_data); avctx->codec = NULL; return 0; @@ -738,7 +741,7 @@ void avcodec_flush_buffers(AVCodecContext *avctx) avctx->codec->flush(avctx); } -void avcodec_default_free_buffers(AVCodecContext *s){ +static void avcodec_default_free_buffers(AVCodecContext *s){ int i, j; if(s->internal_buffer==NULL) return; |