mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-19 09:02:26 +02:00
avs: call release_buffer() at the end.
Fixes a memleak.
This commit is contained in:
parent
06e8d38f2b
commit
80dc7c0160
@ -161,6 +161,15 @@ static av_cold int avs_decode_init(AVCodecContext * avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static av_cold int avs_decode_end(AVCodecContext *avctx)
|
||||||
|
{
|
||||||
|
AvsContext *s = avctx->priv_data;
|
||||||
|
if (s->picture.data[0])
|
||||||
|
avctx->release_buffer(avctx, &s->picture);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
AVCodec ff_avs_decoder = {
|
AVCodec ff_avs_decoder = {
|
||||||
.name = "avs",
|
.name = "avs",
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.type = AVMEDIA_TYPE_VIDEO,
|
||||||
@ -168,6 +177,7 @@ AVCodec ff_avs_decoder = {
|
|||||||
.priv_data_size = sizeof(AvsContext),
|
.priv_data_size = sizeof(AvsContext),
|
||||||
.init = avs_decode_init,
|
.init = avs_decode_init,
|
||||||
.decode = avs_decode_frame,
|
.decode = avs_decode_frame,
|
||||||
|
.close = avs_decode_end,
|
||||||
.capabilities = CODEC_CAP_DR1,
|
.capabilities = CODEC_CAP_DR1,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("AVS (Audio Video Standard) video"),
|
.long_name = NULL_IF_CONFIG_SMALL("AVS (Audio Video Standard) video"),
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user