From 27bffb346447688a11c5411ff154732a323c9ec9 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Wed, 13 May 2026 11:07:48 +0800 Subject: [PATCH] Windows: removes unused config `wmiTimeout` --- doc/json_schema.json | 5 ----- src/options/general.c | 18 ------------------ src/options/general.h | 2 -- 3 files changed, 25 deletions(-) diff --git a/doc/json_schema.json b/doc/json_schema.json index a24ca0547..f8198587d 100644 --- a/doc/json_schema.json +++ b/doc/json_schema.json @@ -898,11 +898,6 @@ ], "default": false }, - "wmiTimeout": { - "type": "integer", - "description": "Set the timeout (ms) for WMI queries, `-1` for no timeout. Windows only", - "default": 5000 - }, "processingTimeout": { "type": "integer", "description": "Set the timeout (ms) when waiting for child processes, `-1` for no timeout", diff --git a/src/options/general.c b/src/options/general.c index 1083a97cc..e10812742 100644 --- a/src/options/general.c +++ b/src/options/general.c @@ -53,11 +53,6 @@ const char* ffOptionsParseGeneralJsonConfig(FFOptionsGeneral* options, yyjson_va options->dsForceDrm = yyjson_get_bool(val) ? FF_DS_FORCE_DRM_TYPE_TRUE : FF_DS_FORCE_DRM_TYPE_FALSE; } } -#elif defined(_WIN32) - else if (unsafe_yyjson_equals_str(key, "wmiTimeout")) { - options->wmiTimeout = (int32_t) yyjson_get_int(val); - } -#endif else { return "Unknown general property"; @@ -87,11 +82,6 @@ bool ffOptionsParseGeneralCommandLine(FFOptionsGeneral* options, const char* key options->dsForceDrm = FF_DS_FORCE_DRM_TYPE_FALSE; } } -#elif defined(_WIN32) - else if (ffStrEqualsIgnCase(key, "--wmi-timeout")) { - options->wmiTimeout = ffOptionParseInt32(key, value); - } -#endif else { return false; @@ -108,8 +98,6 @@ void ffOptionsInitGeneral(FFOptionsGeneral* options) { #if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__) || defined(__GNU__) options->dsForceDrm = FF_DS_FORCE_DRM_TYPE_FALSE; -#elif defined(_WIN32) - options->wmiTimeout = 5000; #endif } @@ -142,10 +130,4 @@ void ffOptionsGenerateGeneralJsonConfig(FFdata* data, FFOptionsGeneral* options) yyjson_mut_obj_add_bool(doc, obj, "dsForceDrm", true); break; } - -#elif defined(_WIN32) - - yyjson_mut_obj_add_int(doc, obj, "wmiTimeout", options->wmiTimeout); - -#endif } diff --git a/src/options/general.h b/src/options/general.h index 080d70c04..454ca6031 100644 --- a/src/options/general.h +++ b/src/options/general.h @@ -17,8 +17,6 @@ typedef struct FFOptionsGeneral { // Module options that cannot be put in module option structure #if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__) || defined(__GNU__) FFDsForceDrmType dsForceDrm; -#elif defined(_WIN32) - int32_t wmiTimeout; #endif } FFOptionsGeneral;