+ new = av_mallocz(sizeof(DrawTextContext));
+ if (!new)
+ return AVERROR(ENOMEM);
+
+ new->class = &drawtext_class;
+ ret = av_opt_copy(new, old);
+ if (ret < 0)
+ goto fail;
+
+ ctx->priv = new;
+ ret = av_set_options_string(ctx, arg, "=", ":");
+ if (ret < 0) {
+ ctx->priv = old;
+ goto fail;
+ }
+
+ ret = init(ctx);
+ if (ret < 0) {
+ uninit(ctx);
+ ctx->priv = old;
+ goto fail;
+ }
+
+ new->reinit = 1;
+
+ ctx->priv = old;