Unified · Split
| @@ -249,11 +249,21 @@ void ff_gblur_init(GBlurContext *s) · 248 unmodified lines | |||
| 249 | ff_gblur_init_x86(s); | 249 | ff_gblur_init_x86(s); |
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | static av_cold void uninit(AVFilterContext *ctx) | ||
| 253 | { | ||
| 254 | GBlurContext *s = ctx->priv; | ||
| 255 | |||
| 256 | av_freep(&s->buffer); | ||
| 257 | av_freep(&s->localbuf); | ||
| 258 | } | ||
| 259 | |||
| 252 | static int config_input(AVFilterLink *inlink) | 260 | static int config_input(AVFilterLink *inlink) |
| 253 | { | 261 | { |
| 254 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); | 262 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); |
| 255 | GBlurContext *s = inlink->dst->priv; | 263 | GBlurContext *s = inlink->dst->priv; |
| 256 | 264 | ||
| 265 | uninit(inlink->dst); | ||
| 266 | |||
| 257 | s->depth = desc->comp[0].depth; | 267 | s->depth = desc->comp[0].depth; |
| 258 | s->flt = !!(desc->flags & AV_PIX_FMT_FLAG_FLOAT); | 268 | s->flt = !!(desc->flags & AV_PIX_FMT_FLAG_FLOAT); |
| 259 | s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w); | 269 | s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w); |
| @@ -379,14 +389,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 119 unmodified lines | |||
| 379 | return ff_filter_frame(outlink, out); | 389 | return ff_filter_frame(outlink, out); |
| 380 | } | 390 | } |
| 381 | 391 | ||
| 382 | static av_cold void uninit(AVFilterContext *ctx) | ||
| 383 | { | ||
| 384 | GBlurContext *s = ctx->priv; | ||
| 385 | |||
| 386 | av_freep(&s->buffer); | ||
| 387 | av_freep(&s->localbuf); | ||
| 388 | } | ||
| 389 | |||
| 390 | static const AVFilterPad gblur_inputs[] = { | 392 | static const AVFilterPad gblur_inputs[] = { |
| 391 | { | 393 | { |
| 392 | .name = "default", | 394 | .name = "default", |