From 7e14dd8bff2d31ee5aa33155b76ac19509246f9e Mon Sep 17 00:00:00 2001 From: Dave Johansen Date: Tue, 6 Feb 2024 15:02:46 -0700 Subject: [PATCH] Parse as float and then round to int (fixes #355) --- m3u8/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m3u8/model.py b/m3u8/model.py index c855469f..c22b7fd1 100644 --- a/m3u8/model.py +++ b/m3u8/model.py @@ -959,7 +959,7 @@ def __init__(self, uri, stream_info, media, base_uri): if resolution is not None: resolution = resolution.strip('"') values = resolution.split("x") - resolution_pair = (int(values[0]), int(values[1])) + resolution_pair = (int(round(float(values[0]))), int(round(float(values[1])))) else: resolution_pair = None