From aed5a7820ae3ee9e81208a9936d1cd7090fe802e Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Wed, 14 Jan 2015 17:58:13 +0200 Subject: [PATCH] Fixed 'length' typos. --- rtcp.c | 2 +- rtcp.h | 2 +- rtp.c | 6 +++--- rtp.h | 2 +- tunerif.h | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rtcp.c b/rtcp.c index 0426010..4008633 100644 --- a/rtcp.c +++ b/rtcp.c @@ -50,7 +50,7 @@ int cSatipRtcp::GetApplicationOffset(int *lengthP) //unsigned int st = bufferM[offset] & 0x1F; // Payload type unsigned int pt = bufferM[offset + 1] & 0xFF; - // Lenght + // Length unsigned int length = ((bufferM[offset + 2] & 0xFF) << 8) | (bufferM[offset + 3] & 0xFF); // Convert it to bytes length = (length + 1) * 4; diff --git a/rtcp.h b/rtcp.h index 953707f..9b31241 100644 --- a/rtcp.h +++ b/rtcp.h @@ -20,7 +20,7 @@ private: cSatipTunerIf &tunerM; unsigned int bufferLenM; unsigned char *bufferM; - int GetApplicationOffset(int *lenghtP); + int GetApplicationOffset(int *lengthP); public: cSatipRtcp(cSatipTunerIf &tunerP); diff --git a/rtp.c b/rtp.c index 741c7fe..3d033f9 100644 --- a/rtp.c +++ b/rtp.c @@ -51,7 +51,7 @@ void cSatipRtp::Close(void) } } -int cSatipRtp::GetHeaderLenght(unsigned char *bufferP, unsigned int lengthP) +int cSatipRtp::GetHeaderLength(unsigned char *bufferP, unsigned int lengthP) { debug16("%s (, %d) [device %d]", __PRETTY_FUNCTION__, lengthP, tunerM.GetId()); unsigned int headerlen = 0; @@ -88,7 +88,7 @@ int cSatipRtp::GetHeaderLenght(unsigned char *bufferP, unsigned int lengthP) } else sequenceNumberM = seq; - // Header lenght + // Header length headerlen = (3 + cc) * (unsigned int)sizeof(uint32_t); // Check if extension if (x) { @@ -130,7 +130,7 @@ void cSatipRtp::Process(void) count = ReadMulti(bufferM, lenMsg, eRtpPacketReadCount, eMaxUdpPacketSizeB); for (int i = 0; i < count; ++i) { unsigned char *p = &bufferM[i * eMaxUdpPacketSizeB]; - int headerlen = GetHeaderLenght(p, lenMsg[i]); + int headerlen = GetHeaderLength(p, lenMsg[i]); if ((headerlen >= 0) && (headerlen < (int)lenMsg[i])) tunerM.ProcessVideoData(p + headerlen, lenMsg[i] - headerlen); } diff --git a/rtp.h b/rtp.h index 1bd140a..5080e37 100644 --- a/rtp.h +++ b/rtp.h @@ -25,7 +25,7 @@ private: time_t lastErrorReportM; int packetErrorsM; int sequenceNumberM; - int GetHeaderLenght(unsigned char *bufferP, unsigned int lengthP); + int GetHeaderLength(unsigned char *bufferP, unsigned int lengthP); public: cSatipRtp(cSatipTunerIf &tunerP); diff --git a/tunerif.h b/tunerif.h index c6f05e1..3790bcd 100644 --- a/tunerif.h +++ b/tunerif.h @@ -12,8 +12,8 @@ class cSatipTunerIf { public: cSatipTunerIf() {} virtual ~cSatipTunerIf() {} - virtual void ProcessVideoData(u_char *bufferP, int lenghtP) = 0; - virtual void ProcessApplicationData(u_char *bufferP, int lenghtP) = 0; + virtual void ProcessVideoData(u_char *bufferP, int lengthP) = 0; + virtual void ProcessApplicationData(u_char *bufferP, int lengthP) = 0; virtual void SetStreamId(int streamIdP) = 0; virtual void SetSessionTimeout(const char *sessionP, int timeoutP) = 0; virtual int GetId(void) = 0;