Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH]  avcodec/adpcm: Fix the decoding error caused by incorrect retrieval of step_index in ADPCM module
@ 2025-12-01  2:00 唐莎 via ffmpeg-devel
  2025-12-01  2:19 ` [FFmpeg-devel] " James Almer via ffmpeg-devel
  0 siblings, 1 reply; 3+ messages in thread
From: 唐莎 via ffmpeg-devel @ 2025-12-01  2:00 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: 唐莎

[-- Attachment #1: "0001-avcodec-adpcm-Fix-the-decoding-error-caused-by-incor.patch --]
[-- Type: application/octet-stream, Size: 1079 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [FFmpeg-devel] Re: [PATCH] avcodec/adpcm: Fix the decoding error caused by incorrect retrieval of step_index in ADPCM module
  2025-12-01  2:00 [FFmpeg-devel] [PATCH] avcodec/adpcm: Fix the decoding error caused by incorrect retrieval of step_index in ADPCM module 唐莎 via ffmpeg-devel
@ 2025-12-01  2:19 ` James Almer via ffmpeg-devel
  0 siblings, 0 replies; 3+ messages in thread
From: James Almer via ffmpeg-devel @ 2025-12-01  2:19 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: James Almer


[-- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [FFmpeg-devel] Re: [PATCH] avcodec/adpcm: Fix the decoding error caused by incorrect retrieval of step_index in ADPCM module
@ 2025-12-01  8:22 唐莎 via ffmpeg-devel
  0 siblings, 0 replies; 3+ messages in thread
From: 唐莎 via ffmpeg-devel @ 2025-12-01  8:22 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: James Almer, 唐莎

[-- Attachment #1: "0001-avcodec-adpcm-Fix-the-decoding-error-caused-by-incor.patch --]
[-- Type: application/octet-stream, Size: 1022 bytes --]

[-- Attachment #2: "error.wav --]
[-- Type: application/octet-stream, Size: 188460 bytes --]

[-- Attachment #3: 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-12-01  9:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-01  2:00 [FFmpeg-devel] [PATCH] avcodec/adpcm: Fix the decoding error caused by incorrect retrieval of step_index in ADPCM module 唐莎 via ffmpeg-devel
2025-12-01  2:19 ` [FFmpeg-devel] " James Almer via ffmpeg-devel
2025-12-01  8:22 唐莎 via ffmpeg-devel

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