mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avcodec/tests/bitstream_template: Assert bits_init8() return
Helps: CID1518967 Unchecked return value
Helps: CID1518968 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e7775973f0
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
87f805613c
commit
d17dcd63b1
@ -61,6 +61,7 @@ int main(int argc, char **argv)
|
|||||||
uint64_t val, val1;
|
uint64_t val, val1;
|
||||||
int32_t sval, sval1;
|
int32_t sval, sval1;
|
||||||
unsigned count;
|
unsigned count;
|
||||||
|
int ret;
|
||||||
|
|
||||||
/* generate random input, using a given or random seed */
|
/* generate random input, using a given or random seed */
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
@ -74,7 +75,8 @@ int main(int argc, char **argv)
|
|||||||
for (unsigned i = 0; i < SIZE; i++)
|
for (unsigned i = 0; i < SIZE; i++)
|
||||||
buf[i] = av_lfg_get(&lfg);
|
buf[i] = av_lfg_get(&lfg);
|
||||||
|
|
||||||
bits_init8 (&bc, buf, SIZE);
|
ret = bits_init8 (&bc, buf, SIZE);
|
||||||
|
av_assert0(ret >= 0);
|
||||||
init_put_bits(&pb, dst, SIZE);
|
init_put_bits(&pb, dst, SIZE);
|
||||||
|
|
||||||
/* use a random sequence of bitreading operations to transfer data
|
/* use a random sequence of bitreading operations to transfer data
|
||||||
|
Loading…
Reference in New Issue
Block a user