clear position before copy

This commit is contained in:
Blake Blackshear 2021-06-23 07:38:30 -05:00
parent fa61e9da29
commit f009897eca

View File

@ -327,7 +327,6 @@ def copy_yuv_to_position(
),
)
if source_frame is None:
# clear y
destination_frame[
y[1] : y[3],
@ -342,7 +341,8 @@ def copy_yuv_to_position(
destination_frame[v1[1] : v1[3], v1[0] : v1[2]] = 128
# clear v2
destination_frame[v2[1] : v2[3], v2[0] : v2[2]] = 128
else:
if not source_frame is None:
# calculate the resized frame, maintaining the aspect ratio
source_aspect_ratio = source_frame.shape[1] / (source_frame.shape[0] // 3 * 2)
dest_aspect_ratio = destination_shape[1] / destination_shape[0]