]> git.sesse.net Git - ffmpeg/commitdiff
10l trocadero: Indeo 5 decoder did not free custom VLCs for macroblock and
authorKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 23 Feb 2010 07:41:29 +0000 (07:41 +0000)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 23 Feb 2010 07:41:29 +0000 (07:41 +0000)
block decoding at exit, so prevent that memory leak now.

Originally committed as revision 21983 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/indeo5.c
libavcodec/ivi_common.c

index e7ec538c39049a88640c05a51cc413ac9ab07cfb..050ee2b1a853ca70b2faa02d57b57cb4f2219fb7 100644 (file)
@@ -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);
 
index 5c2ada16b6fcb0e5228ec71a9b3bf30aa72b4878..2606a925eeef3f4c9ac1b7c939a829c0b449f716 100644 (file)
@@ -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);