Skip to content

Commit

Permalink
Update cam.cpp
Browse files Browse the repository at this point in the history
Allow for sender widths that are not a multiple of 4.
  • Loading branch information
leadedge committed Mar 21, 2023
1 parent de736f7 commit 28ab85b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/cam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@
Allow for applications that do not fill the sender information format field.
If no format is specified use a valid D3D11 texture format.
21.03.23 Update SpoutGL and SpoutDX files
Correct if sized to active sender - width must be a multiple of 4
Rebuild x86/x64 VS2022 /MT
Version 2.027
Expand Down Expand Up @@ -701,7 +702,9 @@ void CVCamStream::SetResolution(DWORD dwResolution)
if (receiver.GetSenderInfo(g_SenderName, width, height, sharehandle, format))
{
// If not fixed to the a selected resolution, use the sender width and height
g_Width = width;
// Width must be a multiple of 4
g_Width = (width/4)*4;
// Aspect ratio is not significantly affected
g_Height = height;
}
}
Expand Down

0 comments on commit 28ab85b

Please sign in to comment.