summaryrefslogtreecommitdiff
path: root/libavcodec/vp6.c
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2010-03-03 22:29:06 +0000
committerAurelien Jacobs <aurel@gnuage.org>2010-03-03 22:29:06 +0000
commitded2100e48cfbf23bcc367a0b215776d5f621419 (patch)
treea5cf98481285953f66cc797d41b72da0d31466ba /libavcodec/vp6.c
parent68b0fd7c685f8db4842f3509a8b47d33e74f6e50 (diff)
downloadffmpeg-ded2100e48cfbf23bcc367a0b215776d5f621419.tar.gz
move vp6 huffman table freeing code, out of common vp56 code
Originally committed as revision 22186 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp6.c')
-rw-r--r--libavcodec/vp6.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index 8bb60ede27..b3dd80ffbf 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -602,6 +602,23 @@ static av_cold int vp6_decode_init(AVCodecContext *avctx)
return 0;
}
+static av_cold int vp6_decode_free(AVCodecContext *avctx)
+{
+ VP56Context *s = avctx->priv_data;
+ int pt, ct, cg;
+
+ vp56_free(avctx);
+
+ for (pt=0; pt<2; pt++) {
+ free_vlc(&s->dccv_vlc[pt]);
+ free_vlc(&s->runv_vlc[pt]);
+ for (ct=0; ct<3; ct++)
+ for (cg=0; cg<6; cg++)
+ free_vlc(&s->ract_vlc[pt][ct][cg]);
+ }
+ return 0;
+}
+
AVCodec vp6_decoder = {
"vp6",
CODEC_TYPE_VIDEO,
@@ -609,7 +626,7 @@ AVCodec vp6_decoder = {
sizeof(VP56Context),
vp6_decode_init,
NULL,
- vp56_free,
+ vp6_decode_free,
vp56_decode_frame,
CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("On2 VP6"),
@@ -623,7 +640,7 @@ AVCodec vp6f_decoder = {
sizeof(VP56Context),
vp6_decode_init,
NULL,
- vp56_free,
+ vp6_decode_free,
vp56_decode_frame,
CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version)"),
@@ -637,7 +654,7 @@ AVCodec vp6a_decoder = {
sizeof(VP56Context),
vp6_decode_init,
NULL,
- vp56_free,
+ vp6_decode_free,
vp56_decode_frame,
CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version, with alpha channel)"),