From 05144df25a7cee81e0297356b24059cf3f256498 Mon Sep 17 00:00:00 2001 From: Peter Olsson Date: Sun, 9 Feb 2014 13:10:44 +0100 Subject: [PATCH] FS-6194 --resolve --- libs/srtp/include/srtp_priv.h | 38 ++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/libs/srtp/include/srtp_priv.h b/libs/srtp/include/srtp_priv.h index 79f43980cf..c2bcbbacd2 100644 --- a/libs/srtp/include/srtp_priv.h +++ b/libs/srtp/include/srtp_priv.h @@ -68,18 +68,27 @@ * fully pack the bit fields. */ +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4214) +#endif + typedef struct { - unsigned cc:4; /* CSRC count */ - unsigned x:1; /* header extension flag */ - unsigned p:1; /* padding flag */ - unsigned version:2; /* protocol version */ - unsigned pt:7; /* payload type */ - unsigned m:1; /* marker bit */ + unsigned char cc:4; /* CSRC count */ + unsigned char x:1; /* header extension flag */ + unsigned char p:1; /* padding flag */ + unsigned char version:2; /* protocol version */ + unsigned char pt:7; /* payload type */ + unsigned char m:1; /* marker bit */ uint16_t seq; /* sequence number */ uint32_t ts; /* timestamp */ uint32_t ssrc; /* synchronization source */ } srtp_hdr_t; +#ifdef _MSC_VER +#pragma warning(pop) +#endif + #else /* BIG_ENDIAN */ typedef struct { @@ -111,15 +120,24 @@ typedef struct { #ifndef WORDS_BIGENDIAN +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4214) +#endif + typedef struct { - unsigned rc:5; /* reception report count */ - unsigned p:1; /* padding flag */ - unsigned version:2; /* protocol version */ - unsigned pt:8; /* payload type */ + unsigned char rc:5; /* reception report count */ + unsigned char p:1; /* padding flag */ + unsigned char version:2; /* protocol version */ + unsigned char pt:8; /* payload type */ uint16_t len; /* length */ uint32_t ssrc; /* synchronization source */ } srtcp_hdr_t; +#ifdef _MSC_VER +#pragma warning(pop) +#endif + typedef struct { unsigned int index:31; /* srtcp packet index in network order! */ unsigned int e:1; /* encrypted? 1=yes */