Commit 6213cf73 authored by Rostislav Pehlivanov's avatar Rostislav Pehlivanov

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: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
parent e13e52fd
...@@ -123,7 +123,7 @@ static inline int parse_gradient(ATRAC9Context *s, ATRAC9BlockData *b, ...@@ -123,7 +123,7 @@ static inline int parse_gradient(ATRAC9Context *s, ATRAC9BlockData *b,
if (grad_range[0] >= grad_range[1] || grad_range[1] > 47) if (grad_range[0] >= grad_range[1] || grad_range[1] > 47)
return AVERROR_INVALIDDATA; 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; return AVERROR_INVALIDDATA;
if (b->grad_boundary > b->q_unit_cnt) if (b->grad_boundary > b->q_unit_cnt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment