mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
c194f2dc32
commit
ee2be6dc82
|
@ -63,20 +63,21 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||||
#if MPV_RUN
|
#if MPV_RUN
|
||||||
check_error(mpv_set_option_string(ctx, "vo", "null"));
|
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"));
|
||||||
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));
|
check_error(mpv_initialize(ctx));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (MPV_FORMAT == MPV_FORMAT_STRING) {
|
if (MPV_FORMAT == MPV_FORMAT_STRING) {
|
||||||
mpv_set_property_string(ctx, name, (void *)data);
|
mpv_set_property_string(ctx, name, (void *)data);
|
||||||
} else {
|
} else {
|
||||||
mpv_set_property(ctx, name, MPV_FORMAT, (void *)data);
|
mpv_set_property(ctx, name, MPV_FORMAT, (void *)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MPV_RUN
|
#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"));
|
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};
|
const char *cmd[] = {"loadfile", "av://lavfi:yuvtestsrc=d=0.1", NULL};
|
||||||
check_error(mpv_command(ctx, cmd));
|
check_error(mpv_command(ctx, cmd));
|
||||||
|
|
Loading…
Reference in New Issue