1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00

atrac9dec: relax gradient value requirements

Unlike the range, the gradient start value does not have to be lower
than the end value.
Does allow more files to be correctly decoded without errors.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This commit is contained in:
Rostislav Pehlivanov 2018-08-27 23:12:36 +01:00
parent e13e52fd0d
commit 6213cf7394

View File

@ -123,7 +123,7 @@ static inline int parse_gradient(ATRAC9Context *s, ATRAC9BlockData *b,
if (grad_range[0] >= grad_range[1] || grad_range[1] > 47)
return AVERROR_INVALIDDATA;
if (grad_value[0] >= grad_value[1] || grad_value[1] >= 32)
if (grad_value[0] > 31 || grad_value[1] > 31)
return AVERROR_INVALIDDATA;
if (b->grad_boundary > b->q_unit_cnt)