History

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.

Kacper Michajłow committed 2 years ago

Commit ee2be6d1 parent c194f2d1 file · +9 −8Browse files

Unified · Split

fuzzers/fuzzer_set_property.c+9−8
@@ -63,20 +63,21 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) · 62 unmodified lines
63#if MPV_RUN63#if MPV_RUN
64 check_error(mpv_set_option_string(ctx, "vo", "null"));64 check_error(mpv_set_option_string(ctx, "vo", "null"));
65 check_error(mpv_set_option_string(ctx, "ao", "null"));65 check_error(mpv_set_option_string(ctx, "ao", "null"));
66 check_error(mpv_set_option_string(ctx, "ao-null-untimed", "yes"));
67 check_error(mpv_set_option_string(ctx, "untimed", "yes"));
68 check_error(mpv_set_option_string(ctx, "video-osd", "no"));
69 66
70 check_error(mpv_initialize(ctx));67 check_error(mpv_initialize(ctx));
71#endif68#endif
72 69
73if (MPV_FORMAT == MPV_FORMAT_STRING) {70 if (MPV_FORMAT == MPV_FORMAT_STRING) {
74 mpv_set_property_string(ctx, name, (void *)data);71 mpv_set_property_string(ctx, name, (void *)data);
75} else {72 } else {
76 mpv_set_property(ctx, name, MPV_FORMAT, (void *)data);73 mpv_set_property(ctx, name, MPV_FORMAT, (void *)data);
77}74 }
78 75
79#if MPV_RUN76#if MPV_RUN
77 check_error(mpv_set_option_string(ctx, "ao-null-untimed", "yes"));
78 check_error(mpv_set_option_string(ctx, "untimed", "yes"));
79 check_error(mpv_set_option_string(ctx, "pause", "no"));
80
80 check_error(mpv_set_option_string(ctx, "audio-files", "av://lavfi:sine=d=0.1"));81 check_error(mpv_set_option_string(ctx, "audio-files", "av://lavfi:sine=d=0.1"));
81 const char *cmd[] = {"loadfile", "av://lavfi:yuvtestsrc=d=0.1", NULL};82 const char *cmd[] = {"loadfile", "av://lavfi:yuvtestsrc=d=0.1", NULL};
82 check_error(mpv_command(ctx, cmd));83 check_error(mpv_command(ctx, cmd));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t