diff options
author | James Almer <jamrial@gmail.com> | 2020-10-09 23:59:40 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2020-10-19 11:54:46 -0300 |
commit | a8a1a58af322b1a03f0c8d0f60ed902e0eb1663a (patch) | |
tree | e598c0ed9371a9cdb3617cc2f7add73ef6461e8d /tools/target_dem_fuzzer.c | |
parent | bddf53841a3efc228b143ee51c8db0daa78643e1 (diff) | |
download | ffmpeg-a8a1a58af322b1a03f0c8d0f60ed902e0eb1663a.tar.gz |
tools/target_dem_fuzzer: switch to the iterate API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'tools/target_dem_fuzzer.c')
-rw-r--r-- | tools/target_dem_fuzzer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/target_dem_fuzzer.c b/tools/target_dem_fuzzer.c index a4d69bb230..8c9e373367 100644 --- a/tools/target_dem_fuzzer.c +++ b/tools/target_dem_fuzzer.c @@ -112,8 +112,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { #endif if (!c) { - av_register_all(); - avcodec_register_all(); av_log_set_level(AV_LOG_PANIC); c=1; } @@ -139,15 +137,17 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { filesize = bytestream2_get_le64(&gbc) & 0x7FFFFFFFFFFFFFFF; if ((flags & 2) && strlen(filename) < sizeof(filename) / 2) { - AVInputFormat *avif = NULL; + const AVInputFormat *avif = NULL; + void *avif_iter = NULL; int avif_count = 0; - while ((avif = av_iformat_next(avif))) { + while ((avif = av_demuxer_iterate(&avif_iter))) { if (avif->extensions) avif_count ++; } avif_count = bytestream2_get_le32(&gbc) % avif_count; - while ((avif = av_iformat_next(avif))) { + avif_iter = NULL; + while ((avif = av_demuxer_iterate(&avif_iter))) { if (avif->extensions) if (!avif_count--) break; |