Closed JayFoxRox closed 3 years ago
is this issue related to the error
pixel buffer size mismatch
when running:
ideo = cv2.VideoCapture(args.video_path)
if not video.isOpened():
raise ValueError("error opening video")
length = int(video.get(cv2.CAP_PROP_FRAME_COUNT))
width = int(video.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(video.get(cv2.CAP_PROP_FRAME_HEIGHT))
fps = video.get(cv2.CAP_PROP_FPS)
print(f"width {width} height{height}")
with pyvirtualcam.Camera(width=width, height=height, fps=fps, fmt=PixelFormat.BGR,
device=args.device) as cam:
...
User passes explicit size here:
https://github.com/letmaik/pyvirtualcam/blob/44b4184b5cae2edaec45e974babff9ebcf9ff410/pyvirtualcam/native_windows/main.cpp#L8-L11
Framebuffer is then passed here:
https://github.com/letmaik/pyvirtualcam/blob/44b4184b5cae2edaec45e974babff9ebcf9ff410/pyvirtualcam/native_windows/main.cpp#L13-L27
However, the framebuffer can be much larger or smaller than the set
width
/height
. This could lead to buffer-overflows probably.