An inline function in MSVC system headers included by these
headers use free(). The local headers (after 239fdf1b) include
internal.h that redirect free to please_use_av_free_instead_of_free.
---
 libavutil/x86/cpu.c |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c
index a63b564..27f51ca 100644
--- a/libavutil/x86/cpu.c
+++ b/libavutil/x86/cpu.c
@@ -22,6 +22,16 @@
 
 #include <stdlib.h>
 #include <string.h>
+#if HAVE_CPUID
+#include <intrin.h>
+#endif
+#if HAVE_XGETBV
+#include <immintrin.h>
+#endif
+#if HAVE_RWEFLAGS
+#include <intrin.h>
+#endif
+
 #include "libavutil/x86_cpu.h"
 #include "libavutil/cpu.h"
 
@@ -35,7 +45,6 @@
         : "=a" (eax), "=S" (ebx), "=c" (ecx), "=d" (edx)        \
         : "0" (index))
 #elif HAVE_CPUID
-#include <intrin.h>
 
 #define cpuid(index, eax, ebx, ecx, edx)        \
     do {                                        \
@@ -52,7 +61,6 @@
 #define xgetbv(index, eax, edx)                                 \
     __asm__ (".byte 0x0f, 0x01, 0xd0" : "=a"(eax), "=d"(edx) : "c" (index))
 #elif HAVE_XGETBV
-#include <immintrin.h>
 
 #define xgetbv(index, eax, edx)                 \
     do {                                        \
@@ -76,8 +84,6 @@
 
 #elif HAVE_RWEFLAGS
 
-#include <intrin.h>
-
 #define get_eflags(x)                           \
     x = __readeflags()
 
-- 
1.7.9.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to