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:
committed by
michaelni
parent
bb65b54f2f
commit
febc82690d
+3
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user