From 9ed60d46dfdaa11c7012afe99151f076ecac404f Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Thu, 13 May 2021 16:50:46 +0200 Subject: [PATCH] float to int --- stream.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stream.py b/stream.py index a7922aa..5314315 100755 --- a/stream.py +++ b/stream.py @@ -213,11 +213,11 @@ class MainHandler(tornado.web.RequestHandler): if isinstance(width_str, str) and isinstance(height_str, str): pass elif isinstance(width_str, str): - width = (width // 16) * 16 - height = (width * 9) / 16 + width = int((width // 16) * 16) + height = int((width * 9) // 16) elif isinstance(height_str, str): - height = (height // 9) * 9 - width = (height * 16) / 9 + height = int((height // 9) * 9) + width = int((height * 16) // 9) origin = self.request.path if stream_server is not None: