Commit 602218d0 authored by reimar's avatar reimar

Call release_buffer on close for v210dec and v210x


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20228 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 17e2c21d
...@@ -114,6 +114,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, ...@@ -114,6 +114,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
static av_cold int decode_close(AVCodecContext *avctx) static av_cold int decode_close(AVCodecContext *avctx)
{ {
AVFrame *pic = avctx->coded_frame;
if (pic->data[0])
avctx->release_buffer(avctx, pic);
av_freep(&avctx->coded_frame); av_freep(&avctx->coded_frame);
return 0; return 0;
......
...@@ -124,6 +124,16 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac ...@@ -124,6 +124,16 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
return avpkt->size; return avpkt->size;
} }
static av_cold int decode_close(AVCodecContext *avctx)
{
AVFrame *pic = avctx->coded_frame;
if (pic->data[0])
avctx->release_buffer(avctx, pic);
av_freep(&avctx->coded_frame);
return 0;
}
AVCodec v210x_decoder = { AVCodec v210x_decoder = {
"v210x", "v210x",
CODEC_TYPE_VIDEO, CODEC_TYPE_VIDEO,
...@@ -131,7 +141,7 @@ AVCodec v210x_decoder = { ...@@ -131,7 +141,7 @@ AVCodec v210x_decoder = {
0, 0,
decode_init, decode_init,
NULL, NULL,
NULL, decode_close,
decode_frame, decode_frame,
CODEC_CAP_DR1, CODEC_CAP_DR1,
}; };
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