From: James Almer via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: James Almer <jamrial@gmail.com>
Subject: [FFmpeg-devel] Re: [PATCH] avcodec/adpcm: Fix the decoding error caused by incorrect retrieval of step_index in ADPCM module
Date: Sun, 30 Nov 2025 23:19:21 -0300
Message-ID: <ba0d4657-f47c-4562-ae87-c1eb6cc67d79@gmail.com> (raw)
In-Reply-To: <7wtrsg8oznr-7x05hjby4js@nsmail8.2--kylin--1>
[-- Attachment #1.1.1: Type: text/plain, Size: 1381 bytes --]
>>From 3a21c9f12121f3e8bcaa704422750a8f45c7e50e Mon Sep 17 00:00:00 2001
> From: tangsha <tangsha@kylinos.cn>
> Date: Thu, 28 Aug 2025 17:45:19 +0800
> Subject: [PATCH] avcodec/adpcm: Fix the decoding error caused by incorrect
> retrieval of step_index in ADPCM module
>
> ---
> libavcodec/adpcm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
> index 4c15be6207..d01d6cd8e4 100644
> --- a/libavcodec/adpcm.c
> +++ b/libavcodec/adpcm.c
> @@ -1345,7 +1345,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame,
Those line offsets are not from the master branch. Are you writing this
targeting a release branch?
> ADPCMChannelStatus *cs = &c->status[i];
> cs->predictor = samples_p[i][0] = sign_extend(bytestream2_get_le16u(&gb), 16);
>
> - cs->step_index = sign_extend(bytestream2_get_le16u(&gb), 16);
> + cs->step_index = bytestream2_get_byteu(&gb);
> + bytestream2_skip(&gb, sizeof(uint8_t));
What's in this byte if not a part of step_index? Also, do you have a
sample that gets fixed by this change?
> if (cs->step_index > 88u){
> av_log(avctx, AV_LOG_ERROR, "ERROR: step_index[%d] = %i\n",
> i, cs->step_index);
> --
> 2.25.1
>
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
[-- Attachment #2: Type: text/plain, Size: 163 bytes --]
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
next prev parent reply other threads:[~2025-12-01 3:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 2:00 [FFmpeg-devel] " 唐莎 via ffmpeg-devel
2025-12-01 2:19 ` James Almer via ffmpeg-devel [this message]
2025-12-01 8:22 [FFmpeg-devel] " 唐莎 via ffmpeg-devel
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=ba0d4657-f47c-4562-ae87-c1eb6cc67d79@gmail.com \
--to=ffmpeg-devel@ffmpeg.org \
--cc=jamrial@gmail.com \
/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