10 changes: 5 additions & 5 deletions src/SdpGenerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
err |= addAttributeString(&optionHead, "x-nv-video[0].framesWithInvalidRefThreshold", "0");

sprintf(payloadStr, "%d", StreamConfig.bitrate);
if (ServerMajorVersion >= 5) {
if (AppVersionQuad[0] >= 5) {
err |= addAttributeString(&optionHead, "x-nv-vqos[0].bw.minimumBitrateKbps", payloadStr);
err |= addAttributeString(&optionHead, "x-nv-vqos[0].bw.maximumBitrateKbps", payloadStr);
}
Expand Down Expand Up @@ -219,17 +219,17 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
err |= addAttributeString(&optionHead, "x-nv-aqos.qosTrafficType", "4");
}

if (ServerMajorVersion == 3) {
if (AppVersionQuad[0] == 3) {
err |= addGen3Options(&optionHead, urlSafeAddr);
}
else if (ServerMajorVersion == 4) {
else if (AppVersionQuad[0] == 4) {
err |= addGen4Options(&optionHead, urlSafeAddr);
}
else {
err |= addGen5Options(&optionHead);
}

if (ServerMajorVersion >= 4) {
if (AppVersionQuad[0] >= 4) {
if (NegotiatedVideoFormat == VIDEO_FORMAT_H265) {
err |= addAttributeString(&optionHead, "x-nv-clientSupportHevc", "1");
err |= addAttributeString(&optionHead, "x-nv-vqos[0].bitStreamFormat", "1");
Expand Down Expand Up @@ -298,7 +298,7 @@ static int fillSdpTail(char* buffer) {
return sprintf(buffer,
"t=0 0\r\n"
"m=video %d \r\n",
ServerMajorVersion < 4 ? 47996 : 47998);
AppVersionQuad[0] < 4 ? 47996 : 47998);
}

// Get the SDP attributes for the stream config
Expand Down
2 changes: 1 addition & 1 deletion src/VideoDepacketizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length) {
lastPacketInStream = streamPacketIndex;

// If this is the first packet, skip the frame header (if one exists)
if (firstPacket && ServerMajorVersion >= 5) {
if (firstPacket && AppVersionQuad[0] >= 5) {
currentPos.offset += 8;
currentPos.length -= 8;
}
Expand Down
4 changes: 2 additions & 2 deletions src/VideoStream.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ int startVideoStream(void* rendererContext, int drFlags) {
}
}

if (ServerMajorVersion == 3) {
if (AppVersionQuad[0] == 3) {
// Connect this socket to open port 47998 for our ping thread
firstFrameSocket = connectTcpSocket(&RemoteAddr, RemoteAddrLen,
FIRST_FRAME_PORT, FIRST_FRAME_TIMEOUT_SEC);
Expand All @@ -234,7 +234,7 @@ int startVideoStream(void* rendererContext, int drFlags) {
return err;
}

if (ServerMajorVersion == 3) {
if (AppVersionQuad[0] == 3) {
// Read the first frame to start the flow of video
err = readFirstFrame();
if (err != 0) {
Expand Down