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>
(cherry picked from commit febc82690d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
e586dd1fe5
commit
eb1e36462a
+3
-1
@@ -1773,7 +1773,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