diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2012-03-08 08:34:30 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2012-03-08 08:34:30 +0000 |
commit | 7af7dc92ae49084c1dbf144d982119c5228972f5 (patch) | |
tree | 8d27942e2ca4be0fc759acb73dba0910fbf5f093 /pjmedia/include/pjmedia/rtcp_xr.h | |
parent | f748efba1a534ad0183a758ab97d4463f2d0c4fb (diff) |
Fix #1440:
- Use separate buffer for outgoing RTCP. Previously, RTCP generation might override outgoing RTP payload (because of shared buffer).
- Use exact size for RTCP-XR content buffer. Previously RTCP-XR content buffer size was set to PJMEDIA_MAX_MTU, quite huge wasted space.
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3969 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include/pjmedia/rtcp_xr.h')
-rw-r--r-- | pjmedia/include/pjmedia/rtcp_xr.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pjmedia/include/pjmedia/rtcp_xr.h b/pjmedia/include/pjmedia/rtcp_xr.h index e44bf1b1..fb204852 100644 --- a/pjmedia/include/pjmedia/rtcp_xr.h +++ b/pjmedia/include/pjmedia/rtcp_xr.h @@ -200,6 +200,17 @@ typedef struct pjmedia_rtcp_xr_rb_voip_mtc jitter buffer */ } pjmedia_rtcp_xr_rb_voip_mtc; + +/** + * Constant of RTCP-XR content size. + */ +#define PJMEDIA_RTCP_XR_BUF_SIZE \ + sizeof(pjmedia_rtcp_xr_rb_rr_time) + \ + sizeof(pjmedia_rtcp_xr_rb_dlrr) + \ + sizeof(pjmedia_rtcp_xr_rb_stats) + \ + sizeof(pjmedia_rtcp_xr_rb_voip_mtc) + + /** * This structure declares RTCP XR (Extended Report) packet. */ @@ -221,7 +232,8 @@ typedef struct pjmedia_rtcp_xr_pkt pj_uint32_t ssrc; /**< SSRC identification */ } common; - pj_int8_t buf[PJMEDIA_MAX_MTU];/**< Content buffer */ + pj_int8_t buf[PJMEDIA_RTCP_XR_BUF_SIZE]; + /**< Content buffer */ } pjmedia_rtcp_xr_pkt; #pragma pack() |