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

View File

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