libavfilter/filtfmts: fix argv/argc checks
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 19 Sep 2012 20:25:41 +0000 (22:25 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 19 Sep 2012 20:43:03 +0000 (22:43 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/filtfmts.c

index 3a3bde6..14417cb 100644 (file)
@@ -78,13 +78,13 @@ int main(int argc, char **argv)
 
     av_log_set_level(AV_LOG_DEBUG);
 
-    if (!argv[1]) {
+    if (argc < 2) {
         fprintf(stderr, "Missing filter name as argument\n");
         return 1;
     }
 
     filter_name = argv[1];
-    if (argv[2])
+    if (argc > 2)
         filter_args = argv[2];
 
     avfilter_register_all();