mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-02 04:52:09 +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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void uninit(AVFilterContext *ctx)
|
||||||
|
{
|
||||||
|
BufferSinkContext *buf = ctx->priv;
|
||||||
|
|
||||||
|
av_frame_free(&buf->peeked_frame);
|
||||||
|
}
|
||||||
|
|
||||||
static int activate(AVFilterContext *ctx)
|
static int activate(AVFilterContext *ctx)
|
||||||
{
|
{
|
||||||
BufferSinkContext *buf = ctx->priv;
|
BufferSinkContext *buf = ctx->priv;
|
||||||
@ -385,6 +392,7 @@ const AVFilter ff_vsink_buffer = {
|
|||||||
.priv_size = sizeof(BufferSinkContext),
|
.priv_size = sizeof(BufferSinkContext),
|
||||||
.priv_class = &buffersink_class,
|
.priv_class = &buffersink_class,
|
||||||
.init = common_init,
|
.init = common_init,
|
||||||
|
.uninit = uninit,
|
||||||
.activate = activate,
|
.activate = activate,
|
||||||
FILTER_INPUTS(ff_video_default_filterpad),
|
FILTER_INPUTS(ff_video_default_filterpad),
|
||||||
.outputs = NULL,
|
.outputs = NULL,
|
||||||
@ -397,6 +405,7 @@ const AVFilter ff_asink_abuffer = {
|
|||||||
.priv_class = &abuffersink_class,
|
.priv_class = &abuffersink_class,
|
||||||
.priv_size = sizeof(BufferSinkContext),
|
.priv_size = sizeof(BufferSinkContext),
|
||||||
.init = common_init,
|
.init = common_init,
|
||||||
|
.uninit = uninit,
|
||||||
.activate = activate,
|
.activate = activate,
|
||||||
FILTER_INPUTS(ff_audio_default_filterpad),
|
FILTER_INPUTS(ff_audio_default_filterpad),
|
||||||
.outputs = NULL,
|
.outputs = NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user