Fix struct initialization of CPU_Feature structure.
authorJonathan Lennox <jonathan@vidyo.com>
Mon, 3 Aug 2015 21:04:24 +0000 (17:04 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Tue, 1 Sep 2015 21:21:31 +0000 (17:21 -0400)
celt/x86/x86cpu.c

index 090e23d..9f570af 100644 (file)
@@ -99,11 +99,15 @@ static void opus_cpu_feature_check(CPU_Feature *cpu_feature)
         cpu_feature->HW_SSE2 = (info[3] & (1 << 26)) != 0;
         cpu_feature->HW_SSE41 = (info[2] & (1 << 19)) != 0;
     }
+    else {
+        cpu_feature->HW_SSE2 = 0;
+        cpu_feature->HW_SSE41 = 0;
+    }
 }
 
 int opus_select_arch(void)
 {
-    CPU_Feature cpu_feature = {0};
+    CPU_Feature cpu_feature;
     int arch;
 
     opus_cpu_feature_check(&cpu_feature);