RTP UDP: do not use separate thread on MSW

Do not use separate receiving thread on MSW because it causes freezes
when the thread is waiting on read() and different thread wants to
set/get different properties of the socket - eg. setsockopt(SO_RCVBUF)
or getsockname().
This commit is contained in:
Martin Pulec
2018-05-31 16:34:16 +02:00
parent 3235122a7c
commit f0c602d19d

View File

@@ -326,10 +326,16 @@ struct rtp **rtp_video_rxtx::initialize_network(const char *addrs, int recv_port
if (send_port == send_port_base + 2)
send_port += 2;
#if !defined WIN32
const bool multithreaded = true;
#else
const bool multithreaded = false;
#endif
devices[index] = rtp_init_if(addr, mcast_if, recv_port,
send_port, ttl, rtcp_bw, FALSE,
rtp_recv_callback, (uint8_t *)participants,
use_ipv6, true);
use_ipv6, multithreaded);
if (devices[index] != NULL) {
rtp_set_option(devices[index], RTP_OPT_WEAK_VALIDATION,
TRUE);