Showing the changes to libavfilter/avfilter.c (1 of 1 file). Show all
Unified · Split
| @@ -681,21 +681,6 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, · 680 unmodified lines | ||
| 681 | 681 | return count; |
| 682 | 682 | } |
| 683 | 683 | |
| 684 | −// TODO: drop me | |
| 685 | −static const char *const filters_left_to_update[] = { | |
| 686 | −#if FF_API_ACONVERT_FILTER | |
| 687 | − "aconvert", | |
| 688 | −#endif | |
| 689 | −}; | |
| 690 | − | |
| 691 | −static int filter_use_deprecated_init(const char *name) | |
| 692 | −{ | |
| 693 | − int i; | |
| 694 | − for (i = 0; i < FF_ARRAY_ELEMS(filters_left_to_update); i++) | |
| 695 | − if (!strcmp(name, filters_left_to_update[i])) | |
| 696 | − return 1; | |
| 697 | − return 0; | |
| 698 | −} | |
| 699 | 684 | #if 0 |
| 700 | 685 | #if FF_API_AVFILTER_INIT_FILTER |
| 701 | 686 | int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque) |
| @@ -717,22 +702,8 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 15 unmodified lines | ||
| 717 | 702 | AVDictionary *options = NULL; |
| 718 | 703 | AVDictionaryEntry *e; |
| 719 | 704 | int ret=0; |
| 720 | − int deprecated_init = filter_use_deprecated_init(filter->filter->name); | |
| 721 | − | |
| 722 | − // TODO: remove old shorthand | |
| 723 | − if (filter->filter->shorthand) { | |
| 724 | − av_assert0(filter->priv); | |
| 725 | − av_assert0(filter->filter->priv_class); | |
| 726 | − *(const AVClass **)filter->priv = filter->filter->priv_class; | |
| 727 | − av_opt_set_defaults(filter->priv); | |
| 728 | − ret = av_opt_set_from_string(filter->priv, args, | |
| 729 | − filter->filter->shorthand, "=", ":"); | |
| 730 | − if (ret < 0) | |
| 731 | − return ret; | |
| 732 | − args = NULL; | |
| 733 | − } | |
| 734 | 705 | |
| 735 | − if (!deprecated_init && args && *args) { | |
| 706 | + if (args && *args) { | |
| 736 | 707 | if (!filter->filter->priv_class) { |
| 737 | 708 | av_log(filter, AV_LOG_ERROR, "This filter does not take any " |
| 738 | 709 | "options, but options were provided: %s.\n", args); |
| @@ -858,7 +829,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 119 unmodified lines | ||
| 858 | 829 | } |
| 859 | 830 | } |
| 860 | 831 | |
| 861 | − if (!deprecated_init && filter->filter->priv_class) { | |
| 832 | + if (filter->filter->priv_class) { | |
| 862 | 833 | ret = av_opt_set_dict(filter->priv, &options); |
| 863 | 834 | if (ret < 0) { |
| 864 | 835 | av_log(filter, AV_LOG_ERROR, "Error applying options to the filter.\n"); |