History

Merge commit '5aa1a668cfae7f617e1a06efad20f87283badd8a'

* commit '5aa1a668cfae7f617e1a06efad20f87283badd8a': vf_frei0r: switch to an AVOptions-based system. Conflicts: doc/filters.texi libavfilter/vf_frei0r.c

Michael Niedermayer committed 13 years ago

Commit da3f8992 parents 9280fc7 5aa1a663 files · +107 −51Browse files

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

Unified · Split

libavfilter/avfilter.c+22−3
@@ -667,6 +667,8 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 666 unmodified lines
667 !strcmp(filter->filter->name, "fade" ) ||667 !strcmp(filter->filter->name, "fade" ) ||
668 !strcmp(filter->filter->name, "fieldorder") ||668 !strcmp(filter->filter->name, "fieldorder") ||
669 !strcmp(filter->filter->name, "fps" ) ||669 !strcmp(filter->filter->name, "fps" ) ||
670 !strcmp(filter->filter->name, "frei0r" ) ||
671 !strcmp(filter->filter->name, "frei0r_src") ||
670 !strcmp(filter->filter->name, "format") ||672 !strcmp(filter->filter->name, "format") ||
671 !strcmp(filter->filter->name, "noformat") ||673 !strcmp(filter->filter->name, "noformat") ||
672 !strcmp(filter->filter->name, "resample")674 !strcmp(filter->filter->name, "resample")
@@ -691,19 +693,36 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 18 unmodified lines
691 if (ret < 0)693 if (ret < 0)
692 goto fail;694 goto fail;
693#if FF_API_OLD_FILTER_OPTS695#if FF_API_OLD_FILTER_OPTS
694 } else if (!strcmp(filter->filter->name, "format") ||696 } else if (!strcmp(filter->filter->name, "format") ||
695 !strcmp(filter->filter->name, "noformat")) {697 !strcmp(filter->filter->name, "noformat") ||
698 !strcmp(filter->filter->name, "frei0r") ||
699 !strcmp(filter->filter->name, "frei0r_src")) {
696 /* a hack for compatibility with the old syntax700 /* a hack for compatibility with the old syntax
697 * replace colons with |s */701 * replace colons with |s */
698 char *copy = av_strdup(args);702 char *copy = av_strdup(args);
699 char *p = copy;703 char *p = copy;
704 int nb_leading = 0; // number of leading colons to skip
700 705
701 if (!copy) {706 if (!copy) {
702 ret = AVERROR(ENOMEM);707 ret = AVERROR(ENOMEM);
703 goto fail;708 goto fail;
704 }709 }
705 710
706 if (strchr(copy, ':')) {711 if (!strcmp(filter->filter->name, "frei0r"))
712 nb_leading = 1;
713 else if (!strcmp(filter->filter->name, "frei0r_src"))
714 nb_leading = 3;
715
716 while (nb_leading--) {
717 p = strchr(p, ':');
718 if (!p) {
719 p = copy + strlen(copy);
720 break;
721 }
722 p++;
723 }
724
725 if (strchr(p, ':')) {
707 av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use "726 av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use "
708 "'|' to separate the list items.\n");727 "'|' to separate the list items.\n");
709 }728 }

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