mirror of https://git.ffmpeg.org/ffmpeg.git
x86: get_cpu_flags: add necessary ifdefs around function body
ff_get_cpu_flags_x86() requires cpuid(), which is conditionally defined elsewhere in the file. Surrounding the function body with ifdefs allows building even when cpuid is not defined. An empty cpuflags mask is returned in this case.
This commit is contained in:
parent
f6fbce761e
commit
a7329e5fc2
|
@ -89,6 +89,9 @@ static int cpuid_test(void)
|
||||||
int ff_get_cpu_flags_x86(void)
|
int ff_get_cpu_flags_x86(void)
|
||||||
{
|
{
|
||||||
int rval = 0;
|
int rval = 0;
|
||||||
|
|
||||||
|
#ifdef cpuid
|
||||||
|
|
||||||
int eax, ebx, ecx, edx;
|
int eax, ebx, ecx, edx;
|
||||||
int max_std_level, max_ext_level, std_caps = 0, ext_caps = 0;
|
int max_std_level, max_ext_level, std_caps = 0, ext_caps = 0;
|
||||||
int family = 0, model = 0;
|
int family = 0, model = 0;
|
||||||
|
@ -192,5 +195,7 @@ int ff_get_cpu_flags_x86(void)
|
||||||
rval |= AV_CPU_FLAG_ATOM;
|
rval |= AV_CPU_FLAG_ATOM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* cpuid */
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue