comparison indeo2.c @ 10399:136334ad62b3 libavcodec

Release frame after decoding is done
author kostya
date Wed, 14 Oct 2009 05:28:24 +0000
parents d719a2711c64
children 8a137661f31e
comparison
equal deleted inserted replaced
10398:11b685acd280 10399:136334ad62b3
211 #endif 211 #endif
212 212
213 return 0; 213 return 0;
214 } 214 }
215 215
216 static av_cold int ir2_decode_end(AVCodecContext *avctx){
217 Ir2Context * const ic = avctx->priv_data;
218 AVFrame *pic = &ic->picture;
219
220 if (pic->data[0])
221 avctx->release_buffer(avctx, pic);
222 av_freep(&ic->picture);
223
224 return 0;
225 }
226
216 AVCodec indeo2_decoder = { 227 AVCodec indeo2_decoder = {
217 "indeo2", 228 "indeo2",
218 CODEC_TYPE_VIDEO, 229 CODEC_TYPE_VIDEO,
219 CODEC_ID_INDEO2, 230 CODEC_ID_INDEO2,
220 sizeof(Ir2Context), 231 sizeof(Ir2Context),
221 ir2_decode_init, 232 ir2_decode_init,
222 NULL, 233 NULL,
223 NULL, 234 ir2_decode_end,
224 ir2_decode_frame, 235 ir2_decode_frame,
225 CODEC_CAP_DR1, 236 CODEC_CAP_DR1,
226 .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 2"), 237 .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 2"),
227 }; 238 };