1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/huffyuvdec: Use assert to check for things that can't fail

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-04-04 21:16:47 +02:00
parent a6d6c8442c
commit f3c8d0399a

View File

@ -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];