History

avfilter: remove old shorthand system

Michael Niedermayer committed 13 years ago

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

Unified · Split

libavfilter/avfilter.c+2−31
@@ -681,21 +681,6 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, · 680 unmodified lines
681681 return count;
682682 }
683683
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−}
699684 #if 0
700685 #if FF_API_AVFILTER_INIT_FILTER
701686 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
717702 AVDictionary *options = NULL;
718703 AVDictionaryEntry *e;
719704 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− }
734705
735− if (!deprecated_init && args && *args) {
706+ if (args && *args) {
736707 if (!filter->filter->priv_class) {
737708 av_log(filter, AV_LOG_ERROR, "This filter does not take any "
738709 "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
858829 }
859830 }
860831
861− if (!deprecated_init && filter->filter->priv_class) {
832+ if (filter->filter->priv_class) {
862833 ret = av_opt_set_dict(filter->priv, &options);
863834 if (ret < 0) {
864835 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