Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avutil/mem: use C11 aligned_malloc()
Date: Sun, 18 Feb 2024 22:37:41 -0300
Message-ID: <ea5aa610-469c-4b78-a52f-38a26b702a66@gmail.com> (raw)
In-Reply-To: <20240219000818.GQ6420@pb2>

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 <jamrial@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-request@ffmpeg.org with subject "unsubscribe".

      reply	other threads:[~2024-02-19  1:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-18 16:16 James Almer
2024-02-18 16:27 ` Andreas Rheinhardt
2024-02-18 16:29   ` James Almer
2024-02-18 18:39     ` Rémi Denis-Courmont
2024-02-18 18:35   ` Rémi Denis-Courmont
2024-02-18 18:37 ` Rémi Denis-Courmont
2024-02-19  0:08 ` Michael Niedermayer
2024-02-19  1:37   ` James Almer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea5aa610-469c-4b78-a52f-38a26b702a66@gmail.com \
    --to=jamrial@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git