aacdec: raise min buffer size to 1000 bytes.
[paraslash.git] / grab_client.c
index ee07d875e085a591437465eca3ef330deddc2bc1..b58c456e89c3545e590439a96afdb8d2ad40a071 100644 (file)
@@ -85,6 +85,7 @@ rewrite:
        return ret;
 }
 
+/* TODO: gengetopt can handle the grab client modes */
 static int check_gc_args(struct grab_client *gc)
 {
        int i;
@@ -95,6 +96,8 @@ static int check_gc_args(struct grab_client *gc)
        for (i = 0; mv[i]; i++)
                if (!strcmp(conf->mode_arg, mv[i]))
                        break;
+       if (!mv[i])
+               return -E_GC_SYNTAX;
        gc->mode = i;
        if (conf->audio_format_given) {
                gc->audio_format_num = get_audio_format_num(conf->audio_format_arg);