mirror of https://git.ffmpeg.org/ffmpeg.git
vsrc_buffer: release the buffer on uninit.
This commit is contained in:
parent
f7f3563214
commit
43fe6a2905
|
@ -114,6 +114,14 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static av_cold void uninit(AVFilterContext *ctx)
|
||||
{
|
||||
BufferSourceContext *s = ctx->priv;
|
||||
if (s->buf)
|
||||
avfilter_unref_buffer(s->buf);
|
||||
s->buf = NULL;
|
||||
}
|
||||
|
||||
static int query_formats(AVFilterContext *ctx)
|
||||
{
|
||||
BufferSourceContext *c = ctx->priv;
|
||||
|
@ -167,6 +175,7 @@ AVFilter avfilter_vsrc_buffer = {
|
|||
.query_formats = query_formats,
|
||||
|
||||
.init = init,
|
||||
.uninit = uninit,
|
||||
|
||||
.inputs = (AVFilterPad[]) {{ .name = NULL }},
|
||||
.outputs = (AVFilterPad[]) {{ .name = "default",
|
||||
|
|
Loading…
Reference in New Issue