Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2012-06-20 02:35:16 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2012-06-20 02:35:16 +0400
commit6429840a48484b90a21cbd0696b24c7d4589fbee (patch)
tree44f2753f1dfdb81bea8642ded3d1f788a913bdbf
parent3c7c87a93353e61ea2502f91a127ec80ebef331c (diff)
libavutil/mem.c: use the __mingw* functions since otherwise linking fails for filters x64
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@5205 10f7b99b-c216-0410-bff0-8a66a9350fd8
-rw-r--r--src/thirdparty/ffmpeg/custom_code.txt1
-rw-r--r--src/thirdparty/ffmpeg/libavutil/mem.c9
2 files changed, 7 insertions, 3 deletions
diff --git a/src/thirdparty/ffmpeg/custom_code.txt b/src/thirdparty/ffmpeg/custom_code.txt
index 5b87f2a19..e27c2309d 100644
--- a/src/thirdparty/ffmpeg/custom_code.txt
+++ b/src/thirdparty/ffmpeg/custom_code.txt
@@ -20,6 +20,7 @@ The following files have MPC-HC specific custom code (compared to FFmpeg):
* libavutil/bswap.h
* libavutil/common.h
* libavutil/log.h
+* libavutil/mem.c
* libavutil/mem.h
* libavutil/samplefmt.h
diff --git a/src/thirdparty/ffmpeg/libavutil/mem.c b/src/thirdparty/ffmpeg/libavutil/mem.c
index 6612d5067..427e9377f 100644
--- a/src/thirdparty/ffmpeg/libavutil/mem.c
+++ b/src/thirdparty/ffmpeg/libavutil/mem.c
@@ -95,7 +95,8 @@ void *av_malloc(size_t size)
if (posix_memalign(&ptr,ALIGN,size))
ptr = NULL;
#elif HAVE_ALIGNED_MALLOC
- ptr = _aligned_malloc(size, ALIGN);
+ //ptr = _aligned_malloc(size, ALIGN);
+ ptr = __mingw_aligned_malloc(size, ALIGN); // MPC-HC patch
#elif HAVE_MEMALIGN
ptr = memalign(ALIGN,size);
/* Why 64?
@@ -148,7 +149,8 @@ void *av_realloc(void *ptr, size_t size)
if(ptr) ptr = (char*)ptr + diff;
return ptr;
#elif HAVE_ALIGNED_MALLOC
- return _aligned_realloc(ptr, size + !size, ALIGN);
+ //return _aligned_realloc(ptr, size + !size, ALIGN);
+ return __mingw_aligned_realloc(ptr, size + !size, ALIGN); // MPC-HC patch
#else
return realloc(ptr, size + !size);
#endif
@@ -175,7 +177,8 @@ void av_free(void *ptr)
if (ptr)
free((char*)ptr - ((char*)ptr)[-1]);
#elif HAVE_ALIGNED_MALLOC
- _aligned_free(ptr);
+ //_aligned_free(ptr);
+ __mingw_aligned_free(ptr); // MPC-HC patch
#else
free(ptr);
#endif