| ... | ... |
@@ -114,6 +114,14 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) |
| 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 = {
|
| 167 | 167 |
.query_formats = query_formats, |
| 168 | 168 |
|
| 169 | 169 |
.init = init, |
| 170 |
+ .uninit = uninit, |
|
| 170 | 171 |
|
| 171 | 172 |
.inputs = (AVFilterPad[]) {{ .name = NULL }},
|
| 172 | 173 |
.outputs = (AVFilterPad[]) {{ .name = "default",
|