Using aligned RFX buffers.
authorArmin Novak <armin.novak@thincast.com>
Wed, 15 Feb 2017 11:37:37 +0000 (12:37 +0100)
committerArmin Novak <armin.novak@thincast.com>
Wed, 15 Feb 2017 11:37:37 +0000 (12:37 +0100)
libfreerdp/codec/rfx.c

index c887846..a4a1ad8 100644 (file)
@@ -167,7 +167,7 @@ static RFX_TILE* rfx_decoder_tile_new(void)
        if (!(tile = (RFX_TILE*) calloc(1, sizeof(RFX_TILE))))
                return NULL;
 
-       if (!(tile->data = (BYTE*) malloc(4 * 64 * 64)))
+       if (!(tile->data = (BYTE*) _aligned_malloc(4 * 64 * 64, 16)))
        {
                free(tile);
                return NULL;
@@ -182,7 +182,7 @@ static void rfx_decoder_tile_free(RFX_TILE* tile)
        if (tile)
        {
                if (tile->allocated)
-                       free(tile->data);
+                       _aligned_free(tile->data);
 
                free(tile);
        }