This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit b96a1ff373e5442707c88a10f6c1941fbeb6a121 Author: Kacper Michajłow <[email protected]> AuthorDate: Mon Jul 6 12:54:16 2026 +0200 Commit: Kacper Michajłow <[email protected]> CommitDate: Tue Jul 21 18:48:57 2026 +0000 tools/target_enc_fuzzer: don't access removed AVCodec::pix_fmts Signed-off-by: Kacper Michajłow <[email protected]> --- tools/target_enc_fuzzer.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/target_enc_fuzzer.c b/tools/target_enc_fuzzer.c index 543770eaae..2e1dfe7dde 100644 --- a/tools/target_enc_fuzzer.c +++ b/tools/target_enc_fuzzer.c @@ -135,12 +135,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { flags64 = bytestream2_get_le64(&gbc); - if (c->p.pix_fmts) { - int npixfmts = 0; - while (c->p.pix_fmts[npixfmts++] != AV_PIX_FMT_NONE) - ; - ctx->pix_fmt = c->p.pix_fmts[bytestream2_get_byte(&gbc) % npixfmts]; - } + const enum AVPixelFormat *pix_fmts; + int pix_fmts_num; + int res = avcodec_get_supported_config(ctx, NULL, AV_CODEC_CONFIG_PIX_FORMAT, + 0, (const void **) &pix_fmts, + &pix_fmts_num); + if (res >= 0 && pix_fmts_num > 0) + ctx->pix_fmt = pix_fmts[bytestream2_get_byte(&gbc) % pix_fmts_num]; switch (c->p.id) { case AV_CODEC_ID_FFV1:{ _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
