Catch case where args are a string but not preset (#4864)

* Catch case where args are a string but not preset

* Fix formatting
This commit is contained in:
Nicolas Mowen 2023-01-02 17:32:12 -07:00 committed by GitHub
parent abc40f2581
commit ceab294840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -247,7 +247,7 @@ def parse_preset_hardware_acceleration_scale(
height: int,
) -> list[str]:
"""Return the correct scaling preset or default preset if none is set."""
if not isinstance(arg, str):
if not isinstance(arg, str) or " " in arg:
scale = PRESETS_HW_ACCEL_SCALE["default"].copy()
scale[1] = str(fps)
scale[3] = f"{width}x{height}"