Skip to content

Commit

Permalink
unity capture: raise frame timeout to maximum
Browse files Browse the repository at this point in the history
  • Loading branch information
letmaik committed Apr 19, 2021
1 parent 1dc2cee commit d03b9a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyvirtualcam/native_windows_unity_capture/virtual_output.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#pragma once

#include <stdio.h>
#define NOMINMAX
#include <Windows.h>
#include <vector>
#include <limits>
#include "../native_shared/image_formats.h"
#include "shared_memory/shared.inl"

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

Expand Down

0 comments on commit d03b9a6

Please sign in to comment.