diff --git a/src/RtpFecQueue.c b/src/RtpFecQueue.c index 2c08735..c729427 100644 --- a/src/RtpFecQueue.c +++ b/src/RtpFecQueue.c @@ -423,7 +423,7 @@ int RtpfAddPacket(PRTP_FEC_QUEUE queue, PRTP_PACKET packet, int length, PRTPFEC_ return RTPF_RET_REJECTED; } - int fecIndex = (nvPacket->fecInfo & 0x3FF000) >> 12; + uint32_t fecIndex = (nvPacket->fecInfo & 0x3FF000) >> 12; // Reinitialize the queue if it's empty after a frame delivery or // if we can't finish a frame before receiving the next one. diff --git a/src/Video.h b/src/Video.h index e861de9..95d8fbb 100644 --- a/src/Video.h +++ b/src/Video.h @@ -17,11 +17,13 @@ bool getNextQueuedDecodeUnit(PQUEUED_DECODE_UNIT* qdu); #define FLAG_SOF 0x4 typedef struct _NV_VIDEO_PACKET { - unsigned int streamPacketIndex; - unsigned int frameIndex; - char flags; - char reserved[3]; - int fecInfo; + uint32_t streamPacketIndex; + uint32_t frameIndex; + uint8_t flags; + uint8_t reserved; + uint8_t multiFecFlags; + uint8_t multiFecBlocks; + uint32_t fecInfo; } NV_VIDEO_PACKET, *PNV_VIDEO_PACKET; #define FLAG_EXTENSION 0x10 @@ -30,11 +32,11 @@ typedef struct _NV_VIDEO_PACKET { #define MAX_RTP_HEADER_SIZE 16 typedef struct _RTP_PACKET { - char header; - char packetType; - unsigned short sequenceNumber; - unsigned int timestamp; - unsigned int ssrc; + uint8_t header; + uint8_t packetType; + uint16_t sequenceNumber; + uint32_t timestamp; + uint32_t ssrc; } RTP_PACKET, *PRTP_PACKET; #pragma pack(pop) diff --git a/src/VideoDepacketizer.c b/src/VideoDepacketizer.c index 833c27b..de54d5b 100644 --- a/src/VideoDepacketizer.c +++ b/src/VideoDepacketizer.c @@ -555,7 +555,7 @@ void requestDecoderRefresh(void) { } // Return 1 if packet is the first one in the frame -static int isFirstPacket(char flags) { +static int isFirstPacket(uint8_t flags) { // Clear the picture data flag flags &= ~FLAG_CONTAINS_PIC_DATA; @@ -570,10 +570,10 @@ static void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length, uint64_t receiveTimeMs, unsigned int presentationTimeMs, PLENTRY_INTERNAL* existingEntry) { BUFFER_DESC currentPos; - unsigned int frameIndex; - char flags; - unsigned int firstPacket; - unsigned int streamPacketIndex; + uint32_t frameIndex; + uint8_t flags; + uint32_t firstPacket; + uint32_t streamPacketIndex; // Mask the top 8 bits from the SPI videoPacket->streamPacketIndex >>= 8;