Skip to content

Commit d03b9a6

Browse files
committed
unity capture: raise frame timeout to maximum
1 parent 1dc2cee commit d03b9a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pyvirtualcam/native_windows_unity_capture/virtual_output.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#pragma once
22

33
#include <stdio.h>
4+
#define NOMINMAX
45
#include <Windows.h>
56
#include <vector>
7+
#include <limits>
68
#include "../native_shared/image_formats.h"
79
#include "shared_memory/shared.inl"
810

@@ -179,7 +181,7 @@ class VirtualOutput {
179181
auto resize_mode = SharedImageMemory::RESIZEMODE_LINEAR;
180182
auto mirror_mode = SharedImageMemory::MIRRORMODE_DISABLED;
181183
// Keep showing last received frame after stopping while receiving app is still capturing.
182-
int timeout = 1000 * 60 * 60 * 24;
184+
constexpr int timeout = std::numeric_limits<int>::max() - SharedImageMemory::RECEIVE_MAX_WAIT;
183185
_shm->Send(_width, _height, stride, _out.size(), format, resize_mode, mirror_mode, timeout, out);
184186
}
185187

0 commit comments

Comments
 (0)