mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-17 06:11:03 +00:00
Round down odd height values to avoid NVENC initialization failure
This commit is contained in:
@@ -209,6 +209,14 @@ int LiStartConnection(PSERVER_INFORMATION serverInfo, PSTREAM_CONFIGURATION stre
|
|||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Height must not be odd or NVENC will fail to initialize
|
||||||
|
if (StreamConfig.height & 0x1) {
|
||||||
|
Limelog("Encoder height must not be odd. Rounding %d to %d",
|
||||||
|
StreamConfig.height,
|
||||||
|
StreamConfig.height & ~0x1);
|
||||||
|
StreamConfig.height = StreamConfig.height & ~0x1;
|
||||||
|
}
|
||||||
|
|
||||||
// Extract the appversion from the supplied string
|
// Extract the appversion from the supplied string
|
||||||
if (extractVersionQuadFromString(serverInfo->serverInfoAppVersion,
|
if (extractVersionQuadFromString(serverInfo->serverInfoAppVersion,
|
||||||
AppVersionQuad) < 0) {
|
AppVersionQuad) < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user