mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-30 03:12:08 +00:00
lavfi/buffersink: avoid leaking peeked_frame on uninit
This commit is contained in:
parent
e78c6a1f2c
commit
c6483f1c2a
@ -164,6 +164,13 @@ static av_cold int common_init(AVFilterContext *ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void uninit(AVFilterContext *ctx)
|
||||
{
|
||||
BufferSinkContext *buf = ctx->priv;
|
||||
|
||||
av_frame_free(&buf->peeked_frame);
|
||||
}
|
||||
|
||||
static int activate(AVFilterContext *ctx)
|
||||
{
|
||||
BufferSinkContext *buf = ctx->priv;
|
||||
@ -385,6 +392,7 @@ const AVFilter ff_vsink_buffer = {
|
||||
.priv_size = sizeof(BufferSinkContext),
|
||||
.priv_class = &buffersink_class,
|
||||
.init = common_init,
|
||||
.uninit = uninit,
|
||||
.activate = activate,
|
||||
FILTER_INPUTS(ff_video_default_filterpad),
|
||||
.outputs = NULL,
|
||||
@ -397,6 +405,7 @@ const AVFilter ff_asink_abuffer = {
|
||||
.priv_class = &abuffersink_class,
|
||||
.priv_size = sizeof(BufferSinkContext),
|
||||
.init = common_init,
|
||||
.uninit = uninit,
|
||||
.activate = activate,
|
||||
FILTER_INPUTS(ff_audio_default_filterpad),
|
||||
.outputs = NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user