diff --git a/limelight-common/ByteBuffer.h b/limelight-common/ByteBuffer.h index 8f13150..7587347 100644 --- a/limelight-common/ByteBuffer.h +++ b/limelight-common/ByteBuffer.h @@ -5,6 +5,7 @@ #define BYTE_ORDER_LITTLE 1 #define BYTE_ORDER_BIG 2 +#ifndef HTONLL #define HTONLL(x) \ ((((x) & 0xff00000000000000ull) >> 56) \ | (((x) & 0x00ff000000000000ull) >> 40) \ @@ -14,6 +15,7 @@ | (((x) & 0x0000000000ff0000ull) << 24) \ | (((x) & 0x000000000000ff00ull) << 40) \ | (((x) & 0x00000000000000ffull) << 56)) +#endif typedef struct _BYTE_BUFFER { char* buffer; diff --git a/limelight-common/RtspConnection.c b/limelight-common/RtspConnection.c index b28541e..3f33959 100644 --- a/limelight-common/RtspConnection.c +++ b/limelight-common/RtspConnection.c @@ -83,7 +83,6 @@ static int initializeRtspRequest(PRTSP_MESSAGE msg, char* command, char* target) static int transactRtspMessage(PRTSP_MESSAGE request, PRTSP_MESSAGE response) { int err, ret = 0; int offset; - PRTSP_MESSAGE responseMsg = NULL; char* serializedMessage = NULL; int messageLen; diff --git a/limelight-common/RtspParser.c b/limelight-common/RtspParser.c index 262be95..e1147d8 100644 --- a/limelight-common/RtspParser.c +++ b/limelight-common/RtspParser.c @@ -57,7 +57,7 @@ static int getMessageLength(PRTSP_MESSAGE msg){ int parseRtspMessage(PRTSP_MESSAGE msg, char *rtspMessage, int length) { char *token, *protocol, *endCheck, *target, *statusStr, *command, *sequence, *content, flag; char messageEnded = 0, *payload = NULL, *opt = NULL; - int statusCode, sequenceNum, exitCode; + int statusCode = 0, sequenceNum, exitCode; POPTION_ITEM options = NULL; POPTION_ITEM newOpt; diff --git a/limelight-common/VideoDepacketizer.c b/limelight-common/VideoDepacketizer.c index 2f891c3..f7fd5e0 100644 --- a/limelight-common/VideoDepacketizer.c +++ b/limelight-common/VideoDepacketizer.c @@ -18,8 +18,6 @@ static int decodingFrame; static LINKED_BLOCKING_QUEUE decodeUnitQueue; static unsigned int nominalPacketDataLength; -static unsigned short lastSequenceNumber; - typedef struct _BUFFER_DESC { char* data; unsigned int offset;