| @@ -508,10 +508,8 @@ static av_cold int test_init(AVFilterContext *ctx, const char *args) · 507 unmodified lines |
| 508 | { | 508 | { |
| 509 | TestSourceContext *test = ctx->priv; | 509 | TestSourceContext *test = ctx->priv; |
| 510 | | 510 | |
| 511 | test->class = &testsrc_class; | | |
| 512 | test->fill_picture_fn = test_fill_picture; | 511 | test->fill_picture_fn = test_fill_picture; |
| 513 | av_opt_set_defaults(test); | 512 | return init(ctx, NULL); |
| 514 | return init(ctx, args); | | |
| 515 | } | 513 | } |
| 516 | | 514 | |
| 517 | static int test_query_formats(AVFilterContext *ctx) | 515 | static int test_query_formats(AVFilterContext *ctx) |
| @@ -534,17 +532,17 @@ static const AVFilterPad avfilter_vsrc_testsrc_outputs[] = { · 16 unmodified lines |
| 534 | }; | 532 | }; |
| 535 | | 533 | |
| 536 | AVFilter avfilter_vsrc_testsrc = { | 534 | AVFilter avfilter_vsrc_testsrc = { |
| 537 | .name = "testsrc", | 535 | .name = "testsrc", |
| 538 | .description = NULL_IF_CONFIG_SMALL("Generate test pattern."), | 536 | .description = NULL_IF_CONFIG_SMALL("Generate test pattern."), |
| 539 | .priv_size = sizeof(TestSourceContext), | 537 | .priv_size = sizeof(TestSourceContext), |
| 540 | .init = test_init, | 538 | .priv_class = &testsrc_class, |
| 541 | .uninit = uninit, | 539 | .init = test_init, |
| | 540 | .uninit = uninit, |
| 542 | | 541 | |
| 543 | .query_formats = test_query_formats, | 542 | .query_formats = test_query_formats, |
| 544 | | 543 | |
| 545 | .inputs = NULL, | 544 | .inputs = NULL, |
| 546 | .outputs = avfilter_vsrc_testsrc_outputs, | 545 | .outputs = avfilter_vsrc_testsrc_outputs, |
| 547 | .priv_class = &testsrc_class, | | |
| 548 | }; | 546 | }; |
| 549 | | 547 | |
| 550 | #endif /* CONFIG_TESTSRC_FILTER */ | 548 | #endif /* CONFIG_TESTSRC_FILTER */ |
| @@ -615,10 +613,8 @@ static av_cold int rgbtest_init(AVFilterContext *ctx, const char *args) · 64 unmodified lines |
| 615 | TestSourceContext *test = ctx->priv; | 613 | TestSourceContext *test = ctx->priv; |
| 616 | | 614 | |
| 617 | test->draw_once = 1; | 615 | test->draw_once = 1; |
| 618 | test->class = &rgbtestsrc_class; | | |
| 619 | test->fill_picture_fn = rgbtest_fill_picture; | 616 | test->fill_picture_fn = rgbtest_fill_picture; |
| 620 | av_opt_set_defaults(test); | 617 | return init(ctx, NULL); |
| 621 | return init(ctx, args); | | |
| 622 | } | 618 | } |
| 623 | | 619 | |
| 624 | static int rgbtest_query_formats(AVFilterContext *ctx) | 620 | static int rgbtest_query_formats(AVFilterContext *ctx) |
| @@ -654,18 +650,18 @@ static const AVFilterPad avfilter_vsrc_rgbtestsrc_outputs[] = { · 29 unmodified lines |
| 654 | }; | 650 | }; |
| 655 | | 651 | |
| 656 | AVFilter avfilter_vsrc_rgbtestsrc = { | 652 | AVFilter avfilter_vsrc_rgbtestsrc = { |
| 657 | .name = "rgbtestsrc", | 653 | .name = "rgbtestsrc", |
| 658 | .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."), | 654 | .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."), |
| 659 | .priv_size = sizeof(TestSourceContext), | 655 | .priv_size = sizeof(TestSourceContext), |
| 660 | .init = rgbtest_init, | 656 | .priv_class = &rgbtestsrc_class, |
| 661 | .uninit = uninit, | 657 | .init = rgbtest_init, |
| | 658 | .uninit = uninit, |
| 662 | | 659 | |
| 663 | .query_formats = rgbtest_query_formats, | 660 | .query_formats = rgbtest_query_formats, |
| 664 | | 661 | |
| 665 | .inputs = NULL, | 662 | .inputs = NULL, |
| 666 | | 663 | |
| 667 | .outputs = avfilter_vsrc_rgbtestsrc_outputs, | 664 | .outputs = avfilter_vsrc_rgbtestsrc_outputs, |
| 668 | .priv_class = &rgbtestsrc_class, | | |
| 669 | }; | 665 | }; |
| 670 | | 666 | |
| 671 | #endif /* CONFIG_RGBTESTSRC_FILTER */ | 667 | #endif /* CONFIG_RGBTESTSRC_FILTER */ |