mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avfilter/vf_separatefields: stop leaking last frame
This can happen when filtering is ended without receiving EOF.
This commit is contained in:
parent
463b81de2b
commit
41096904d0
@ -118,6 +118,13 @@ static int request_frame(AVFilterLink *outlink)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static av_cold void uninit(AVFilterContext *ctx)
|
||||||
|
{
|
||||||
|
SeparateFieldsContext *s = ctx->priv;
|
||||||
|
|
||||||
|
av_frame_free(&s->second);
|
||||||
|
}
|
||||||
|
|
||||||
static const AVFilterPad separatefields_inputs[] = {
|
static const AVFilterPad separatefields_inputs[] = {
|
||||||
{
|
{
|
||||||
.name = "default",
|
.name = "default",
|
||||||
@ -141,6 +148,7 @@ AVFilter ff_vf_separatefields = {
|
|||||||
.name = "separatefields",
|
.name = "separatefields",
|
||||||
.description = NULL_IF_CONFIG_SMALL("Split input video frames into fields."),
|
.description = NULL_IF_CONFIG_SMALL("Split input video frames into fields."),
|
||||||
.priv_size = sizeof(SeparateFieldsContext),
|
.priv_size = sizeof(SeparateFieldsContext),
|
||||||
|
.uninit = uninit,
|
||||||
.inputs = separatefields_inputs,
|
.inputs = separatefields_inputs,
|
||||||
.outputs = separatefields_outputs,
|
.outputs = separatefields_outputs,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user