[vlc-commits] Win32: fix mismatched alloc/free

Rémi Denis-Courmont git at videolan.org
Mon Jun 19 22:01:56 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jun 19 23:01:18 2017 +0300| [2b7f535e7bf086683d143314491deb47a5416f14] | committer: Rémi Denis-Courmont

Win32: fix mismatched alloc/free

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2b7f535e7bf086683d143314491deb47a5416f14
---

 modules/video_chroma/copy.c    | 2 +-
 modules/video_filter/gradfun.c | 2 +-
 src/misc/picture.c             | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/video_chroma/copy.c b/modules/video_chroma/copy.c
index 5b785414b3..4bc2e91c45 100644
--- a/modules/video_chroma/copy.c
+++ b/modules/video_chroma/copy.c
@@ -37,7 +37,7 @@ int CopyInitCache(copy_cache_t *cache, unsigned width)
 {
 #ifdef CAN_COMPILE_SSE2
     cache->size = __MAX((width + 0x3f) & ~ 0x3f, 8192);
-    cache->buffer = vlc_memalign(64, cache->size);
+    cache->buffer = aligned_alloc(64, cache->size);
     if (!cache->buffer)
         return VLC_EGENERIC;
 #else
diff --git a/modules/video_filter/gradfun.c b/modules/video_filter/gradfun.c
index f356d13b89..317c604f7b 100644
--- a/modules/video_filter/gradfun.c
+++ b/modules/video_filter/gradfun.c
@@ -194,7 +194,7 @@ static picture_t *Filter(filter_t *filter, picture_t *src)
     cfg->thresh = (1 << 15) / strength;
     if (cfg->radius != radius) {
         cfg->radius = radius;
-        cfg->buf    = vlc_memalign(16,
+        cfg->buf    = aligned_alloc(16,
                                    (((fmt->i_width + 15) & ~15) * (cfg->radius + 1) / 2 + 32) * sizeof(*cfg->buf));
     }
 
diff --git a/src/misc/picture.c b/src/misc/picture.c
index d7d6c7ae47..3bac926714 100644
--- a/src/misc/picture.c
+++ b/src/misc/picture.c
@@ -62,7 +62,7 @@ static int AllocatePicture( picture_t *p_pic )
         i_bytes += p->i_pitch * p->i_lines;
     }
 
-    uint8_t *p_data = vlc_memalign( 16, i_bytes );
+    uint8_t *p_data = aligned_alloc( 16, i_bytes );
     if( i_bytes > 0 && p_data == NULL )
     {
         p_pic->i_planes = 0;



More information about the vlc-commits mailing list