aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-04-04 21:16:47 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-04-07 21:59:32 +0200
commitf3c8d0399acdf5dc0f0990bba3d7f0fb7c6e407c (patch)
tree59949c8978aaa69bfc04b10fd733e0fd51e9df1a
parenta6d6c8442ce9cc93a1a1202e0ceaaec11aaf77c9 (diff)
downloadffmpeg-f3c8d0399acdf5dc0f0990bba3d7f0fb7c6e407c.tar.gz
avcodec/huffyuvdec: Use assert to check for things that can't fail
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/huffyuvdec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c
index e35d55c8ad..a8ccb724f5 100644
--- a/libavcodec/huffyuvdec.c
+++ b/libavcodec/huffyuvdec.c
@@ -290,13 +290,13 @@ static int read_old_huffman_tables(HYuvDecContext *s)
bytestream2_init(&gb, classic_shift_luma,
sizeof(classic_shift_luma));
- if ((ret = read_len_table(s->len[0], &gb, 256)) < 0)
- return ret;
+ ret = read_len_table(s->len[0], &gb, 256);
+ av_assert1(ret >= 0);
bytestream2_init(&gb, classic_shift_chroma,
sizeof(classic_shift_chroma));
- if ((ret = read_len_table(s->len[1], &gb, 256)) < 0)
- return ret;
+ ret = read_len_table(s->len[1], &gb, 256);
+ av_assert1(ret >= 0);
for (i = 0; i < 256; i++)
s->bits[0][i] = classic_add_luma[i];