From 7d14b2a2be6dd2feb6e0f334531509e53bdb1502 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 27 Jun 2018 23:52:29 -0700 Subject: [PATCH] Fix endianness issue with the RI key IV --- app/backend/nvhttp.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/backend/nvhttp.cpp b/app/backend/nvhttp.cpp index c915ee1a..e8721c91 100644 --- a/app/backend/nvhttp.cpp +++ b/app/backend/nvhttp.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #define REQUEST_TIMEOUT_MS 5000 @@ -132,7 +133,7 @@ NvHTTP::launchApp(int appId, QString::number(streamConfig->fps)+ "&additionalStates=1&sops="+QString::number(sops ? 1 : 0)+ "&rikey="+QByteArray(streamConfig->remoteInputAesKey, sizeof(streamConfig->remoteInputAesKey)).toHex()+ - "&rikeyid="+QString::number(*(int*)streamConfig->remoteInputAesIv)+ + "&rikeyid="+QString::number(qFromBigEndian(*(int*)streamConfig->remoteInputAesIv))+ (streamConfig->enableHdr ? "&hdrMode=1&clientHdrCapVersion=0&clientHdrCapSupportedFlagsInUint32=0&clientHdrCapMetaDataId=NV_STATIC_METADATA_TYPE_1&clientHdrCapDisplayData=0x0x0x0x0x0x0x0x0x0x0" : "")+ @@ -153,7 +154,7 @@ NvHTTP::resumeApp(PSTREAM_CONFIGURATION streamConfig) openConnectionToString(m_BaseUrlHttps, "resume", "rikey="+QString(QByteArray(streamConfig->remoteInputAesKey, sizeof(streamConfig->remoteInputAesKey)).toHex())+ - "&rikeyid="+QString::number(*(int*)streamConfig->remoteInputAesIv)+ + "&rikeyid="+QString::number(qFromBigEndian(*(int*)streamConfig->remoteInputAesIv))+ "&surroundAudioInfo="+getSurroundAudioInfoString(streamConfig->audioConfiguration), false);