mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/vf_random: fix memory leaks
Fixes #8296
(cherry picked from commit 3488e0977c
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2ce2537088
commit
a0307736e7
|
@ -108,6 +108,14 @@ static int request_frame(AVFilterLink *outlink)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static av_cold void uninit(AVFilterContext *ctx)
|
||||
{
|
||||
RandomContext *s = ctx->priv;
|
||||
|
||||
for (int i = 0; i < s->nb_frames; i++)
|
||||
av_frame_free(&s->frames[i]);
|
||||
}
|
||||
|
||||
static const AVFilterPad random_inputs[] = {
|
||||
{
|
||||
.name = "default",
|
||||
|
@ -132,6 +140,7 @@ AVFilter ff_vf_random = {
|
|||
.priv_size = sizeof(RandomContext),
|
||||
.priv_class = &random_class,
|
||||
.init = init,
|
||||
.uninit = uninit,
|
||||
.inputs = random_inputs,
|
||||
.outputs = random_outputs,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue