+ if (!strncmp(arg, "-n=", 3)) {
+ ret = para_atoi32(arg + 3, &gc->filter_num);
+ if (ret < 0)
+ return ret;
+ if (gc->filter_num < 0)
+ return -E_BAD_GC_FILTER_NUM;
+ if (gc->filter_num >= max_num_filters())
+ return -E_BAD_GC_FILTER_NUM;
+ continue;
+ }
+ if (!strncmp(arg, "-m", 2)) {
+ if (*(arg + 3))
+ return -E_GC_SYNTAX;
+ switch(*(arg + 2)) {
+ case 's':
+ gc->mode = GM_SLOPPY;
+ continue;
+ case 'a':
+ gc->mode = GM_AGGRESSIVE;
+ continue;
+ case 'p':
+ gc->mode = GM_PEDANTIC;
+ continue;
+ default:
+ return -E_GC_SYNTAX;
+ }
+ }
+ if (!strcmp(arg, "-i")) {
+ gc->flags |= GF_INPUT_GRAB;
+ continue;
+ }
+ if (!strcmp(arg, "-o")) {
+ gc->flags |= GF_ONE_SHOT;
+ continue;
+ }
+ if (!strncmp(arg, "-f=", 3)) {
+ ret = get_audio_format_num(arg + 3);
+ if (ret < 0)
+ return ret;
+ gc->audio_format_num = ret;
+ continue;
+ }
+ return -E_GC_SYNTAX;