avutil/cpu: fix cpu-test to work with ffmpegs cpuflags syntax

Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-08-06 00:35:53 +02:00
parent 296b01d7f9
commit 1b168e3bcf

View 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':