Mercurial > libavcodec.hg
comparison wnv1.c @ 10399:136334ad62b3 libavcodec
Release frame after decoding is done
author | kostya |
---|---|
date | Wed, 14 Oct 2009 05:28:24 +0000 |
parents | b949a56ecc07 |
children | 8a137661f31e |
comparison
equal
deleted
inserted
replaced
10398:11b685acd280 | 10399:136334ad62b3 |
---|---|
141 &code_tab[0][0], 4, 2, INIT_VLC_USE_NEW_STATIC); | 141 &code_tab[0][0], 4, 2, INIT_VLC_USE_NEW_STATIC); |
142 | 142 |
143 return 0; | 143 return 0; |
144 } | 144 } |
145 | 145 |
146 static av_cold int decode_end(AVCodecContext *avctx){ | |
147 WNV1Context * const l = avctx->priv_data; | |
148 AVFrame *pic = &l->pic; | |
149 | |
150 if (pic->data[0]) | |
151 avctx->release_buffer(avctx, pic); | |
152 av_freep(&l->pic); | |
153 | |
154 return 0; | |
155 } | |
156 | |
146 AVCodec wnv1_decoder = { | 157 AVCodec wnv1_decoder = { |
147 "wnv1", | 158 "wnv1", |
148 CODEC_TYPE_VIDEO, | 159 CODEC_TYPE_VIDEO, |
149 CODEC_ID_WNV1, | 160 CODEC_ID_WNV1, |
150 sizeof(WNV1Context), | 161 sizeof(WNV1Context), |
151 decode_init, | 162 decode_init, |
152 NULL, | 163 NULL, |
153 NULL, | 164 decode_end, |
154 decode_frame, | 165 decode_frame, |
155 CODEC_CAP_DR1, | 166 CODEC_CAP_DR1, |
156 .long_name = NULL_IF_CONFIG_SMALL("Winnov WNV1"), | 167 .long_name = NULL_IF_CONFIG_SMALL("Winnov WNV1"), |
157 }; | 168 }; |