History

avfilter: remove old shorthand system

Michael Niedermayer committed 13 years ago

Commit 04924bc1 parent 9c5f3921 file · +2 −31Browse files

Showing the changes to libavfilter/avfilter.c (1 of 1 file). Show all

Unified · Split

libavfilter/avfilter.c+2−31
@@ -681,21 +681,6 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, · 680 unmodified lines
681 return count;681 return count;
682}682}
683 683
684// TODO: drop me
685static const char *const filters_left_to_update[] = {
686#if FF_API_ACONVERT_FILTER
687 "aconvert",
688#endif
689};
690
691static 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#if 0684#if 0
700#if FF_API_AVFILTER_INIT_FILTER685#if FF_API_AVFILTER_INIT_FILTER
701int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque)686int 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 AVDictionary *options = NULL;702 AVDictionary *options = NULL;
718 AVDictionaryEntry *e;703 AVDictionaryEntry *e;
719 int ret=0;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 if (!filter->filter->priv_class) {707 if (!filter->filter->priv_class) {
737 av_log(filter, AV_LOG_ERROR, "This filter does not take any "708 av_log(filter, AV_LOG_ERROR, "This filter does not take any "
738 "options, but options were provided: %s.\n", args);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 ret = av_opt_set_dict(filter->priv, &options);833 ret = av_opt_set_dict(filter->priv, &options);
863 if (ret < 0) {834 if (ret < 0) {
864 av_log(filter, AV_LOG_ERROR, "Error applying options to the filter.\n");835 av_log(filter, AV_LOG_ERROR, "Error applying options to the filter.\n");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t