This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch release/9.0
in repository ffmpeg.
The following commit(s) were added to refs/heads/release/9.0 by this push:
new 5da834256b avformat/mp3enc: fix underflow of the LAME encoder delay
5da834256b is described below
commit 5da834256bdbe27e356e5752426bd15e53bf06ff
Author: Romain Beauxis <[email protected]>
AuthorDate: Sun Aug 2 11:46:06 2026 -0500
Commit: Romain Beauxis <[email protected]>
CommitDate: Mon Aug 3 09:44:01 2026 -0500
avformat/mp3enc: fix underflow of the LAME encoder delay
AV_RL32() is unsigned, so a skip_samples value below 528 + 1 wraps around
instead of clamping to zero and is written out as a delay of 4095 samples.
(cherry picked from commit 146e0f7b792033848e549c58ff928645fdeb5991)
Signed-off-by: Romain Beauxis <[email protected]>
---
libavformat/mp3enc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 87c13f92bd..131fb231fc 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -367,9 +367,9 @@ static int mp3_write_audio_packet(AVFormatContext *s,
AVPacket *pkt)
AV_PKT_DATA_SKIP_SAMPLES,
&side_data_size);
if (side_data && side_data_size >= 10) {
- mp3->padding = FFMAX(AV_RL32(side_data + 4) + 528 + 1, 0);
+ mp3->padding = FFMAX((int64_t)AV_RL32(side_data + 4) + 528 +
1, 0);
if (!mp3->delay)
- mp3->delay = FFMAX(AV_RL32(side_data) - 528 - 1, 0);
+ mp3->delay = FFMAX((int64_t)AV_RL32(side_data) - 528 - 1,
0);
} else {
mp3->padding = 0;
}
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]