On 2/18/2024 9:08 PM, Michael Niedermayer wrote:
On Sun, Feb 18, 2024 at 01:16:36PM -0300, James Almer wrote:
Save for the Microsoft C Runtime library, where free() can't handle aligned
buffers, aligned_malloc() should be available and working on all supported
targets.
Also, malloc() alone may be sufficient if alignment requirement is low, so add
a check for it.
Signed-off-by: James Almer <jamr...@gmail.com>
---
configure | 2 --
libavutil/mem.c | 42 ++++++------------------------------------
2 files changed, 6 insertions(+), 38 deletions(-)
This breaks build here
libavutil/mem.c: In function ‘av_malloc’:
libavutil/mem.c:108:15: error: implicit declaration of function
‘aligned_malloc’; did you mean ‘aligned_alloc’?
[-Werror=implicit-function-declaration]
ptr = aligned_malloc(size, ALIGN);
^~~~~~~~~~~~~~
aligned_alloc
libavutil/mem.c:108:13: warning: assignment makes pointer from integer without
a cast [-Wint-conversion]
ptr = aligned_malloc(size, ALIGN);
^
cc1: some warnings being treated as errors
ffbuild/common.mak:81: recipe for target 'libavutil/mem.o' failed
Yes, i mistyped aligned_alloc as aligned_malloc.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".