Avoid closing RTP/RTCP ports.

This commit is contained in:
Rolf Ahrenberg 2018-02-06 22:54:36 +02:00
parent 2c6c6ea5fd
commit 0ce8ae7206
1 changed files with 2 additions and 2 deletions

View File

@ -388,8 +388,8 @@ void cSatipTuner::SetupTransport(int rtpPortP, int rtcpPortP, const char *stream
// Adapt RTP to any transport media change
if (multicast != rtpM.IsMulticast() || rtpPortP != rtpM.Port()) {
cSatipPoller::GetInstance()->Unregister(rtpM);
rtpM.Close();
if (rtpPortP >= 0) {
rtpM.Close();
if (multicast)
rtpM.OpenMulticast(rtpPortP, streamAddrP, sourceAddrP);
else
@ -400,8 +400,8 @@ void cSatipTuner::SetupTransport(int rtpPortP, int rtcpPortP, const char *stream
// Adapt RTCP to any transport media change
if (multicast != rtcpM.IsMulticast() || rtcpPortP != rtcpM.Port()) {
cSatipPoller::GetInstance()->Unregister(rtcpM);
rtcpM.Close();
if (rtcpPortP >= 0) {
rtcpM.Close();
if (multicast)
rtcpM.OpenMulticast(rtcpPortP, streamAddrP, sourceAddrP);
else