This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 87182e2abc avcodec/audiotoolbox: use 64-bit channel masks
87182e2abc is described below
commit 87182e2abc88969ed57998a7c11518199feaa008
Author: Ayoub Nabil Boubagrat
<[email protected]>
AuthorDate: Thu Aug 6 18:06:39 2026 +0200
Commit: michaelni <[email protected]>
CommitDate: Fri Aug 21 03:35:19 2026 +0000
avcodec/audiotoolbox: use 64-bit channel masks
the channel mask expressions used an int literal, making shifts for
channel ids 31 and above undefined before conversion to uint64_t.
use a 64-bit literal in the encoder mapping and decoder layout mask.
Signed-off-by: Ayoub Nabil Boubagrat
<[email protected]>
---
libavcodec/audiotoolboxdec.c | 4 ++--
libavcodec/audiotoolboxenc.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c
index 08203c5310..143a10f7f0 100644
--- a/libavcodec/audiotoolboxdec.c
+++ b/libavcodec/audiotoolboxdec.c
@@ -201,9 +201,9 @@ static int ffat_update_ctx(AVCodecContext *avctx)
int id =
ffat_get_channel_id(layout->mChannelDescriptions[i].mChannelLabel);
if (id < 0)
goto done;
- if (layout_mask & (1 << id))
+ if (layout_mask & (1ULL << id))
goto done;
- layout_mask |= 1 << id;
+ layout_mask |= 1ULL << id;
layout->mChannelDescriptions[i].mChannelFlags = i; // Abusing
flags as index
}
av_channel_layout_uninit(&avctx->ch_layout);
diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c
index 11af7c0154..1aa2ca317b 100644
--- a/libavcodec/audiotoolboxenc.c
+++ b/libavcodec/audiotoolboxenc.c
@@ -176,7 +176,7 @@ static int get_ilbc_mode(AVCodecContext *avctx)
static av_cold int get_channel_label(int channel)
{
- uint64_t map = 1 << channel;
+ uint64_t map = 1ULL << channel;
if (map <= AV_CH_LOW_FREQUENCY)
return channel + 1;
else if (map <= AV_CH_BACK_RIGHT)
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]