Commit 759196bf authored by jai_menon's avatar jai_menon

pngdec.c : release allocated buffers.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20680 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent f2490ba9
...@@ -642,6 +642,18 @@ static av_cold int png_dec_init(AVCodecContext *avctx){ ...@@ -642,6 +642,18 @@ static av_cold int png_dec_init(AVCodecContext *avctx){
return 0; return 0;
} }
static av_cold int png_dec_end(AVCodecContext *avctx)
{
PNGDecContext *s = avctx->priv_data;
if (s->picture1.data[0])
avctx->release_buffer(avctx, &s->picture1);
if (s->picture2.data[0])
avctx->release_buffer(avctx, &s->picture2);
return 0;
}
AVCodec png_decoder = { AVCodec png_decoder = {
"png", "png",
CODEC_TYPE_VIDEO, CODEC_TYPE_VIDEO,
...@@ -649,7 +661,7 @@ AVCodec png_decoder = { ...@@ -649,7 +661,7 @@ AVCodec png_decoder = {
sizeof(PNGDecContext), sizeof(PNGDecContext),
png_dec_init, png_dec_init,
NULL, NULL,
NULL, //decode_end, png_dec_end,
decode_frame, decode_frame,
CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/, CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/,
NULL, NULL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment