[FFmpeg-devel] [PATCH 2/3] avcodec/atrac9dec: Replace impossible conditions by assert
Michael Niedermayer
michael at niedermayer.cc
Sun Aug 4 02:16:07 EEST 2019
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/atrac9dec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c
index 2e23ea44e8..491e889788 100644
--- a/libavcodec/atrac9dec.c
+++ b/libavcodec/atrac9dec.c
@@ -124,8 +124,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] > 31 || grad_value[1] > 31)
- return AVERROR_INVALIDDATA;
+ av_assert0(grad_value[0] <= 31 && grad_value[1] <= 31);
if (b->grad_boundary > b->q_unit_cnt)
return AVERROR_INVALIDDATA;
--
2.22.0
More information about the ffmpeg-devel
mailing list