aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean McGovern <gseanmcg@gmail.com>2011-07-25 18:51:02 -0400
committerReinhard Tartler <siretart@tauware.de>2011-09-26 19:26:31 +0200
commit1cf3ba89711748b340c31fe018a3a72e8e9b75f1 (patch)
treeee10354042a68933146ec1528b771603d3388158
parent2b74db8d2781202742535a466a371a10a108b141 (diff)
downloadffmpeg-1cf3ba89711748b340c31fe018a3a72e8e9b75f1.tar.gz
cpu detection: avoid a signed overflow
1<<31 overflows because 1 is signed, so force it to unsigned. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 5938e02185430ca711106aaec9b5622dbf588af3) Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--libavutil/x86/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c
index 78aeadf0a1..f747e4dba8 100644
--- a/libavutil/x86/cpu.c
+++ b/libavutil/x86/cpu.c
@@ -113,7 +113,7 @@ int ff_get_cpu_flags_x86(void)
if(max_ext_level >= 0x80000001){
cpuid(0x80000001, eax, ebx, ecx, ext_caps);
- if (ext_caps & (1<<31))
+ if (ext_caps & (1U<<31))
rval |= AV_CPU_FLAG_3DNOW;
if (ext_caps & (1<<30))
rval |= AV_CPU_FLAG_3DNOWEXT;