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
667667 !strcmp(filter->filter->name, "fade" ) ||
668668 !strcmp(filter->filter->name, "fieldorder") ||
669669 !strcmp(filter->filter->name, "fps" ) ||
670+ !strcmp(filter->filter->name, "frei0r" ) ||
671+ !strcmp(filter->filter->name, "frei0r_src") ||
670672 !strcmp(filter->filter->name, "format") ||
671673 !strcmp(filter->filter->name, "noformat") ||
672674 !strcmp(filter->filter->name, "resample")
@@ -691,19 +693,36 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 18 unmodified lines
691693 if (ret < 0)
692694 goto fail;
693695 #if FF_API_OLD_FILTER_OPTS
694− } else if (!strcmp(filter->filter->name, "format") ||
695− !strcmp(filter->filter->name, "noformat")) {
696+ } else if (!strcmp(filter->filter->name, "format") ||
697+ !strcmp(filter->filter->name, "noformat") ||
698+ !strcmp(filter->filter->name, "frei0r") ||
699+ !strcmp(filter->filter->name, "frei0r_src")) {
696700 /* a hack for compatibility with the old syntax
697701 * replace colons with |s */
698702 char *copy = av_strdup(args);
699703 char *p = copy;
704+ int nb_leading = 0; // number of leading colons to skip
700705
701706 if (!copy) {
702707 ret = AVERROR(ENOMEM);
703708 goto fail;
704709 }
705710
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, ':')) {
707726 av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use "
708727 "'|' to separate the list items.\n");
709728 }

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