fix compare_videos in vlc.py (#242)

fix result in the same format of float number.
This commit is contained in:
Zeyi Sun
2025-07-08 16:25:00 +08:00
committed by GitHub
parent 7d0ad02706
commit b6d9a804fa

View File

@@ -308,7 +308,7 @@ def compare_videos(video_path1, video_path2, max_frames_to_check=100, threshold=
# If a video ends, then check if both ended to confirm they are of the same length
if not ret1 or not ret2:
return ret1 == ret2
return 1. if ret1 == ret2 else 0. # return float only
# Convert frames to PIL Images
frame1 = Image.fromarray(cv2.cvtColor(frame1, cv2.COLOR_BGR2RGB))