aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2010-02-23 07:41:29 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2010-02-23 07:41:29 +0000
commit60819e694ee5733741da91ebc237b20621de5bc3 (patch)
treed593d3880bd84f7caaac1d1edc20f2496e638abc /libavcodec
parent4f974de6f6282d6ecfe4c976d07ee20b782d0be8 (diff)
downloadffmpeg-60819e694ee5733741da91ebc237b20621de5bc3.tar.gz
10l trocadero: Indeo 5 decoder did not free custom VLCs for macroblock and
block decoding at exit, so prevent that memory leak now. Originally committed as revision 21983 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/indeo5.c3
-rw-r--r--libavcodec/ivi_common.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c
index e7ec538c39..050ee2b1a8 100644
--- a/libavcodec/indeo5.c
+++ b/libavcodec/indeo5.c
@@ -860,6 +860,9 @@ static av_cold int decode_close(AVCodecContext *avctx)
ff_ivi_free_buffers(&ctx->planes[0]);
+ if (ctx->mb_vlc_cust.table)
+ free_vlc(&ctx->mb_vlc_cust);
+
if (ctx->frame.data[0])
avctx->release_buffer(avctx, &ctx->frame);
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 5c2ada16b6..2606a925ee 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -208,6 +208,8 @@ void av_cold ff_ivi_free_buffers(IVIPlaneDesc *planes)
av_freep(&planes[p].bands[b].bufs[1]);
av_freep(&planes[p].bands[b].bufs[2]);
+ if (planes[p].bands[b].blk_vlc_cust.table)
+ free_vlc(&planes[p].bands[b].blk_vlc_cust);
for (t = 0; t < planes[p].bands[b].num_tiles; t++)
av_freep(&planes[p].bands[b].tiles[t].mbs);
av_freep(&planes[p].bands[b].tiles);