Skip to content

Commit

Permalink
fix(video2x): fixed the issue where output width/height aren't calcul…
Browse files Browse the repository at this point in the history
…ated if they are None

Signed-off-by: k4yt3x <i@k4yt3x.com>
  • Loading branch information
k4yt3x committed Sep 20, 2023
1 parent 71821db commit 7c70032
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions video2x/video2x.py
Expand Up @@ -394,10 +394,10 @@ def upscale(
width, height, total_frames, frame_rate = self._get_video_info(input_path)

# automatically calculate output width and height if only one is given
if output_width == 0:
if output_width == 0 or output_width is None:
output_width = output_height / height * width

elif output_height == 0:
elif output_height == 0 or output_width is None:
output_height = output_width / width * height

# sanitize output width and height to be divisible by 2
Expand Down

0 comments on commit 7c70032

Please sign in to comment.