Merge pull request #1776 in FS/freeswitch from bugfix/FS-11966-fix-regression-after-libsrtp-upgrade-to-2.2.0-resulting-in-no-audio to master

* commit '9b05fabd533c21f126e1ab2eb01c9b2f7d7681df':
  FS-11966: [core] Fix regression after libsrtp upgrade to 2.2.0 resulting in no audio
This commit is contained in:
Andrey Volk 2019-07-29 11:37:49 -05:00
commit 28fc17a0c4
1 changed files with 14 additions and 6 deletions

View File

@ -176,6 +176,10 @@ typedef struct srtp_ctx_t_ {
* is not identical) * is not identical)
*/ */
#ifdef _MSC_VER
#pragma pack(push, r1, 1)
#endif
#ifndef WORDS_BIGENDIAN #ifndef WORDS_BIGENDIAN
typedef struct { typedef struct {
@ -185,8 +189,8 @@ typedef struct {
unsigned version : 2; /* protocol version */ unsigned version : 2; /* protocol version */
unsigned pt : 7; /* payload type */ unsigned pt : 7; /* payload type */
unsigned m : 1; /* marker bit */ unsigned m : 1; /* marker bit */
uint16_t seq; /* sequence number */ unsigned seq : 16; /* sequence number */
uint32_t ts; /* timestamp */ unsigned ts : 32; /* timestamp */
uint32_t ssrc; /* synchronization source */ uint32_t ssrc; /* synchronization source */
} srtp_hdr_t; } srtp_hdr_t;
@ -199,8 +203,8 @@ typedef struct {
unsigned cc : 4; /* CSRC count */ unsigned cc : 4; /* CSRC count */
unsigned m : 1; /* marker bit */ unsigned m : 1; /* marker bit */
unsigned pt : 7; /* payload type */ unsigned pt : 7; /* payload type */
uint16_t seq; /* sequence number */ unsigned seq: 16; /* sequence number */
uint32_t ts; /* timestamp */ unsigned ts : 32; /* timestamp */
uint32_t ssrc; /* synchronization source */ uint32_t ssrc; /* synchronization source */
} srtp_hdr_t; } srtp_hdr_t;
@ -225,7 +229,7 @@ typedef struct {
unsigned p : 1; /* padding flag */ unsigned p : 1; /* padding flag */
unsigned version : 2; /* protocol version */ unsigned version : 2; /* protocol version */
unsigned pt : 8; /* payload type */ unsigned pt : 8; /* payload type */
uint16_t len; /* length */ unsigned len : 16; /* length */
uint32_t ssrc; /* synchronization source */ uint32_t ssrc; /* synchronization source */
} srtcp_hdr_t; } srtcp_hdr_t;
@ -243,7 +247,7 @@ typedef struct {
unsigned p : 1; /* padding flag */ unsigned p : 1; /* padding flag */
unsigned rc : 5; /* reception report count */ unsigned rc : 5; /* reception report count */
unsigned pt : 8; /* payload type */ unsigned pt : 8; /* payload type */
uint16_t len; /* length */ unsigned len : 16; /* length */
uint32_t ssrc; /* synchronization source */ uint32_t ssrc; /* synchronization source */
} srtcp_hdr_t; } srtcp_hdr_t;
@ -256,6 +260,10 @@ typedef struct {
#endif #endif
#ifdef _MSC_VER
#pragma pack(pop, r1)
#endif
/* /*
* srtp_handle_event(srtp, srtm, evnt) calls the event handling * srtp_handle_event(srtp, srtm, evnt) calls the event handling
* function, if there is one. * function, if there is one.