Skip to content

Commit

Permalink
Parse as float and then round to int (fixes globocom#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
daveisfera committed Feb 6, 2024
1 parent 306da4c commit 7e14dd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion m3u8/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7e14dd8

Please sign in to comment.