mirror of
https://github.com/k4yt3x/video2x.git
synced 2024-12-29 16:09:10 +00:00
fix(video2x): fixed the issue where output width/height aren't calculated if they are None
Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
parent
71821dbb56
commit
7c70032fe7
@ -394,10 +394,10 @@ class Video2X:
|
|||||||
width, height, total_frames, frame_rate = self._get_video_info(input_path)
|
width, height, total_frames, frame_rate = self._get_video_info(input_path)
|
||||||
|
|
||||||
# automatically calculate output width and height if only one is given
|
# 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
|
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
|
output_height = output_width / width * height
|
||||||
|
|
||||||
# sanitize output width and height to be divisible by 2
|
# sanitize output width and height to be divisible by 2
|
||||||
|
Loading…
Reference in New Issue
Block a user