History

fftools/cmdutils: fix printing group name in split_commandline()

Anton Khirnov committed 2 years ago

Commit ddaedde1 parent 9e8be931 file · +5 −4Browse files

Unified · Split

fftools/cmdutils.c+5−4
@@ -793,7 +793,7 @@ int split_commandline(OptionParseContext *octx, int argc, char *argv[], · 792 unmodified lines
793793 while (optindex < argc) {
794794 const char *opt = argv[optindex++], *arg;
795795 const OptionDef *po;
796− int ret;
796+ int ret, group_idx;
797797
798798 av_log(NULL, AV_LOG_DEBUG, "Reading option '%s' ...", opt);
799799
@@ -822,14 +822,15 @@ do { \ · 22 unmodified lines
822822 } while (0)
823823
824824 /* named group separators, e.g. -i */
825− if ((ret = match_group_separator(groups, nb_groups, opt)) >= 0) {
825+ group_idx = match_group_separator(groups, nb_groups, opt);
826+ if (group_idx >= 0) {
826827 GET_ARG(arg);
827− ret = finish_group(octx, ret, arg);
828+ ret = finish_group(octx, group_idx, arg);
828829 if (ret < 0)
829830 return ret;
830831
831832 av_log(NULL, AV_LOG_DEBUG, " matched as %s with argument '%s'.\n",
832− groups[ret].name, arg);
833+ groups[group_idx].name, arg);
833834 continue;
834835 }
835836

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