From e586dd1fe57c55cafc7fd61816b7e1f01dc958a1 Mon Sep 17 00:00:00 2001 From: Priyanshu Thapliyal Date: Thu, 26 Mar 2026 17:59:15 +0530 Subject: [PATCH] avcodec/alsdec: fix mantissa unpacking in compressed Part A path Signed-off-by: Priyanshu Thapliyal (cherry picked from commit ae6f233988a4128b1759ae54982d07b750b7f294) Signed-off-by: Michael Niedermayer --- libavcodec/alsdec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 7fbde60681..fc10c18696 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1529,8 +1529,12 @@ static int read_diff_float_data(ALSDecContext *ctx, unsigned int ra_frame) { return AVERROR_INVALIDDATA; } + j = 0; for (i = 0; i < frame_length; ++i) { - ctx->raw_mantissa[c][i] = AV_RB32(larray); + if (ctx->raw_samples[c][i] == 0) { + ctx->raw_mantissa[c][i] = AV_RB32(larray + j); + j += 4; + } } } }