Commit 0bf7097d authored by Simon Morlat's avatar Simon Morlat

fix recv buff size of RTP packet: should be 1500 at minimum, regardless of...

fix recv buff size of RTP packet: should be 1500 at minimum, regardless of configured mtu (ms_get_mtu()).
parent 7fc7b08f
......@@ -27,6 +27,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <ctype.h>
#ifndef MS_MINIMAL_MTU
/*this is used for determining the minimum size of recv buffers for RTP packets
Keep 1500 for maximum interoparibility*/
#define MS_MINIMAL_MTU 1500
#endif
#if defined(_WIN32_WCE)
time_t
......@@ -120,7 +126,7 @@ RtpSession * create_duplex_rtpsession(int loc_rtp_port, int loc_rtcp_port, bool_
RtpSession *rtpr;
rtpr = rtp_session_new(RTP_SESSION_SENDRECV);
rtp_session_set_recv_buf_size(rtpr, ms_get_mtu());
rtp_session_set_recv_buf_size(rtpr, MAX(ms_get_mtu() , MS_MINIMAL_MTU));
rtp_session_set_scheduling_mode(rtpr, 0);
rtp_session_set_blocking_mode(rtpr, 0);
rtp_session_enable_adaptive_jitter_compensation(rtpr, TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment