avutil/cpu: fix cpu-test to work with ffmpegs cpuflags syntax
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 5 Aug 2014 22:35:53 +0000 (00:35 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 5 Aug 2014 22:36:19 +0000 (00:36 +0200)
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/cpu.c

index 1192619..03f89cb 100644 (file)
@@ -357,10 +357,11 @@ int main(int argc, char **argv)
         switch (c) {
         case 'c':
         {
-            int cpuflags = av_parse_cpu_flags(optarg);
-            if (cpuflags < 0)
+            unsigned flags = av_get_cpu_flags();
+            if (av_parse_cpu_caps(&flags, optarg) < 0)
                 return 2;
-            av_set_cpu_flags_mask(cpuflags);
+
+            av_force_cpu_flags(flags);
             break;
         }
         case 't':