avcodec/alsdec: propagate read_diff_float_data() errors in read_frame_data()

The return value of read_diff_float_data() was previously ignored,
allowing decode to continue silently with partially transformed samples
on malformed floating ALS input. Check and propagate the error.

All failure paths in read_diff_float_data() already return
AVERROR_INVALIDDATA, so the caller fix is sufficient without
any normalization inside the function.

Signed-off-by: Priyanshu Thapliyal <priyanshuthapliyal2005@gmail.com>
This commit is contained in:
Priyanshu Thapliyal
2026-03-25 13:36:07 +05:30
committed by michaelni
parent bb65b54f2f
commit febc82690d
+3 -1
View File
@@ -1794,7 +1794,9 @@ static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame)
}
if (sconf->floating) {
read_diff_float_data(ctx, ra_frame);
ret = read_diff_float_data(ctx, ra_frame);
if (ret < 0)
return ret;
}
if (get_bits_left(gb) < 0) {