Showing the changes to libavfilter/vsrc_buffer.c (1 of 1 file). Show all
Unified · Split
| @@ -114,6 +114,14 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) · 113 unmodified lines | ||
| 114 | 114 | return 0; |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | +static av_cold void uninit(AVFilterContext *ctx) | |
| 118 | +{ | |
| 119 | + BufferSourceContext *s = ctx->priv; | |
| 120 | + if (s->buf) | |
| 121 | + avfilter_unref_buffer(s->buf); | |
| 122 | + s->buf = NULL; | |
| 123 | +} | |
| 124 | + | |
| 117 | 125 | static int query_formats(AVFilterContext *ctx) |
| 118 | 126 | { |
| 119 | 127 | BufferSourceContext *c = ctx->priv; |
| @@ -167,6 +175,7 @@ AVFilter avfilter_vsrc_buffer = { · 47 unmodified lines | ||
| 167 | 175 | .query_formats = query_formats, |
| 168 | 176 | |
| 169 | 177 | .init = init, |
| 178 | + .uninit = uninit, | |
| 170 | 179 | |
| 171 | 180 | .inputs = (AVFilterPad[]) {{ .name = NULL }}, |
| 172 | 181 | .outputs = (AVFilterPad[]) {{ .name = "default", |