Mercurial > libavcodec.hg
diff utils.c @ 1994:8d3540dddd1b libavcodec
cleanup & memleak fix
author | michael |
---|---|
date | Fri, 30 Apr 2004 17:42:58 +0000 |
parents | bc5039adb9af |
children | f481d3309ad0 |
line wrap: on
line diff
--- a/utils.c Fri Apr 30 16:06:20 2004 +0000 +++ b/utils.c Fri Apr 30 17:42:58 2004 +0000 @@ -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 @@ { 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 @@ 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;