diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2020-03-27 11:27:26 +0100 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2020-03-27 13:40:11 +0100 |
commit | 45045a1097ad983d75e4f1ea9a32e61844430a60 (patch) | |
tree | 924263913fd26d44f3db886dc4676f7fbc5b2d98 /src/3rdparty/libwebp/src/webp/mux_types.h | |
parent | 5a1a12b0e135eb49f7b232c729859583b76bd507 (diff) |
Update bundled libwebp to version 1.1.0
[ChangeLog][Third-Party Code] Update bundled libwebp to version 1.1.0
Change-Id: Id41e437610947b9e6b86205317a469b052dccb5d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/3rdparty/libwebp/src/webp/mux_types.h')
-rw-r--r-- | src/3rdparty/libwebp/src/webp/mux_types.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/3rdparty/libwebp/src/webp/mux_types.h b/src/3rdparty/libwebp/src/webp/mux_types.h index ceea77d..2fe8195 100644 --- a/src/3rdparty/libwebp/src/webp/mux_types.h +++ b/src/3rdparty/libwebp/src/webp/mux_types.h @@ -14,7 +14,6 @@ #ifndef WEBP_WEBP_MUX_TYPES_H_ #define WEBP_WEBP_MUX_TYPES_H_ -#include <stdlib.h> // free() #include <string.h> // memset() #include "./types.h" @@ -56,6 +55,7 @@ typedef enum WebPMuxAnimBlend { // Data type used to describe 'raw' data, e.g., chunk data // (ICC profile, metadata) and WebP compressed image data. +// 'bytes' memory must be allocated using WebPMalloc() and such. struct WebPData { const uint8_t* bytes; size_t size; @@ -68,11 +68,11 @@ static WEBP_INLINE void WebPDataInit(WebPData* webp_data) { } } -// Clears the contents of the 'webp_data' object by calling free(). Does not -// deallocate the object itself. +// Clears the contents of the 'webp_data' object by calling WebPFree(). +// Does not deallocate the object itself. static WEBP_INLINE void WebPDataClear(WebPData* webp_data) { if (webp_data != NULL) { - free((void*)webp_data->bytes); + WebPFree((void*)webp_data->bytes); WebPDataInit(webp_data); } } @@ -83,7 +83,7 @@ static WEBP_INLINE int WebPDataCopy(const WebPData* src, WebPData* dst) { if (src == NULL || dst == NULL) return 0; WebPDataInit(dst); if (src->bytes != NULL && src->size != 0) { - dst->bytes = (uint8_t*)malloc(src->size); + dst->bytes = (uint8_t*)WebPMalloc(src->size); if (dst->bytes == NULL) return 0; memcpy((void*)dst->bytes, src->bytes, src->size); dst->size = src->size; |