]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/ppc/cpu.c
mpjpegdec: fix memory leak in probe function
[ffmpeg] / libavutil / ppc / cpu.c
index 49646b0aa4c7ade9a096e29093b506d0468fc3f7..0f1e9826245460af28258077bcea7d2a942d8151 100644 (file)
@@ -37,6 +37,7 @@
 #include <proto/exec.h>
 #endif /* __APPLE__ */
 
+#include "libavutil/avassert.h"
 #include "libavutil/cpu.h"
 #include "libavutil/cpu_internal.h"
 
@@ -96,6 +97,8 @@ int ff_get_cpu_flags_ppc(void)
                 if (buf[i + 1] & PPC_FEATURE_HAS_POWER8)
                     ret |= AV_CPU_FLAG_POWER8;
 #endif
+                if (ret & AV_CPU_FLAG_VSX)
+                    av_assert0(ret & AV_CPU_FLAG_ALTIVEC);
                 goto out;
             }
         }
@@ -104,7 +107,7 @@ int ff_get_cpu_flags_ppc(void)
 out:
     close(fd);
     return ret;
-#elif CONFIG_RUNTIME_CPUDETECT && defined(__linux__) && !ARCH_PPC64
+#elif CONFIG_RUNTIME_CPUDETECT && defined(__linux__)
 #define PVR_G4_7400  0x000C
 #define PVR_G5_970   0x0039
 #define PVR_G5_970FX 0x003C