From ee2be6dc82f739cb141d3a45fd27e0015c91eab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Mon, 17 Jun 2024 19:48:05 +0200 Subject: [PATCH] fuzzer_set_property: force untimed and pause state We don't want to accidentally set those options and timeout in pause state. Remove video-osd as there is no reason to set it in fact. --- fuzzers/fuzzer_set_property.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/fuzzers/fuzzer_set_property.c b/fuzzers/fuzzer_set_property.c index 384b6c82e8..60edc91add 100644 --- a/fuzzers/fuzzer_set_property.c +++ b/fuzzers/fuzzer_set_property.c @@ -63,20 +63,21 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) #if MPV_RUN check_error(mpv_set_option_string(ctx, "vo", "null")); check_error(mpv_set_option_string(ctx, "ao", "null")); - check_error(mpv_set_option_string(ctx, "ao-null-untimed", "yes")); - check_error(mpv_set_option_string(ctx, "untimed", "yes")); - check_error(mpv_set_option_string(ctx, "video-osd", "no")); check_error(mpv_initialize(ctx)); #endif -if (MPV_FORMAT == MPV_FORMAT_STRING) { - mpv_set_property_string(ctx, name, (void *)data); -} else { - mpv_set_property(ctx, name, MPV_FORMAT, (void *)data); -} + if (MPV_FORMAT == MPV_FORMAT_STRING) { + mpv_set_property_string(ctx, name, (void *)data); + } else { + mpv_set_property(ctx, name, MPV_FORMAT, (void *)data); + } #if MPV_RUN + check_error(mpv_set_option_string(ctx, "ao-null-untimed", "yes")); + check_error(mpv_set_option_string(ctx, "untimed", "yes")); + check_error(mpv_set_option_string(ctx, "pause", "no")); + check_error(mpv_set_option_string(ctx, "audio-files", "av://lavfi:sine=d=0.1")); const char *cmd[] = {"loadfile", "av://lavfi:yuvtestsrc=d=0.1", NULL}; check_error(mpv_command(ctx, cmd));