| @@ -368,17 +368,11 @@ static int cmp_intervals(const void *a, const void *b) · 367 unmodified lines |
| 368 | 368 | return ret == 0 ? i1->index - i2->index : ret; |
| 369 | 369 | } |
| 370 | 370 | |
| 371 | | −static av_cold int init(AVFilterContext *ctx, const char *args, const AVClass *class) |
| 371 | +static av_cold int init(AVFilterContext *ctx) |
| 372 | 372 | { |
| 373 | 373 | SendCmdContext *sendcmd = ctx->priv; |
| 374 | 374 | int ret, i, j; |
| 375 | 375 | |
| 376 | | − sendcmd->class = class; |
| 377 | | − av_opt_set_defaults(sendcmd); |
| 378 | | − |
| 379 | | − if ((ret = av_set_options_string(sendcmd, args, "=", ":")) < 0) |
| 380 | | − return ret; |
| 381 | | − |
| 382 | 376 | if (sendcmd->commands_filename && sendcmd->commands_str) { |
| 383 | 377 | av_log(ctx, AV_LOG_ERROR, |
| 384 | 378 | "Only one of the filename or commands options must be specified\n"); |
| @@ -433,8 +427,6 @@ static void av_cold uninit(AVFilterContext *ctx) · 48 unmodified lines |
| 433 | 427 | SendCmdContext *sendcmd = ctx->priv; |
| 434 | 428 | int i, j; |
| 435 | 429 | |
| 436 | | − av_opt_free(sendcmd); |
| 437 | | − |
| 438 | 430 | for (i = 0; i < sendcmd->nb_intervals; i++) { |
| 439 | 431 | Interval *interval = &sendcmd->intervals[i]; |
| 440 | 432 | for (j = 0; j < interval->nb_commands; j++) { |
| @@ -520,7 +512,7 @@ AVFILTER_DEFINE_CLASS(sendcmd); · 79 unmodified lines |
| 520 | 512 | |
| 521 | 513 | static av_cold int sendcmd_init(AVFilterContext *ctx, const char *args) |
| 522 | 514 | { |
| 523 | | − return init(ctx, args, &sendcmd_class); |
| 515 | + return init(ctx); |
| 524 | 516 | } |
| 525 | 517 | |
| 526 | 518 | static const AVFilterPad sendcmd_inputs[] = { |
| @@ -562,7 +554,7 @@ AVFILTER_DEFINE_CLASS(asendcmd); · 35 unmodified lines |
| 562 | 554 | |
| 563 | 555 | static av_cold int asendcmd_init(AVFilterContext *ctx, const char *args) |
| 564 | 556 | { |
| 565 | | − return init(ctx, args, &asendcmd_class); |
| 557 | + return init(ctx); |
| 566 | 558 | } |
| 567 | 559 | |
| 568 | 560 | static const AVFilterPad asendcmd_inputs[] = { |