From 7608e8e69d9ef7bcf7461a64284e0a6e6251b466 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 4 Jul 2023 14:56:20 -0500 Subject: [PATCH] Enforce setting serverCodecModeSupport field in SERVER_INFORMATION --- src/Connection.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Connection.c b/src/Connection.c index 40b00c7..6668a75 100644 --- a/src/Connection.c +++ b/src/Connection.c @@ -209,12 +209,21 @@ int LiStartConnection(PSERVER_INFORMATION serverInfo, PSTREAM_CONFIGURATION stre if (drCallbacks != NULL && (drCallbacks->capabilities & CAPABILITY_PULL_RENDERER) && drCallbacks->submitDecodeUnit) { Limelog("CAPABILITY_PULL_RENDERER cannot be set with a submitDecodeUnit callback\n"); + LC_ASSERT(false); err = -1; goto Cleanup; } if (drCallbacks != NULL && (drCallbacks->capabilities & CAPABILITY_PULL_RENDERER) && (drCallbacks->capabilities & CAPABILITY_DIRECT_SUBMIT)) { Limelog("CAPABILITY_PULL_RENDERER and CAPABILITY_DIRECT_SUBMIT cannot be set together\n"); + LC_ASSERT(false); + err = -1; + goto Cleanup; + } + + if (serverInfo->serverCodecModeSupport == 0) { + Limelog("serverCodecModeSupport field in SERVER_INFORMATION must be set!\n"); + LC_ASSERT(false); err = -1; goto Cleanup; }