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: