+static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
+{
+ AVFilterLink *inlink = ctx->inputs[0];
+ DrawBoxContext *s = ctx->priv;
+ int old_x = s->x;
+ int old_y = s->y;
+ int old_w = s->w;
+ int old_h = s->h;
+ int old_t = s->thickness;
+ int old_r = s->replace;
+ int ret;
+
+ ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
+ if (ret < 0)
+ return ret;
+
+ ret = init(ctx);
+ if (ret < 0)
+ goto end;
+ ret = config_input(inlink);;
+end:
+ if (ret < 0) {
+ s->x = old_x;
+ s->y = old_y;
+ s->w = old_w;
+ s->h = old_h;
+ s->thickness = old_t;
+ s->replace = old_r;
+ }
+
+ return ret;
+}
+