Avoid closing RTP/RTCP ports.

This commit is contained in:
Rolf Ahrenberg 2018-02-06 22:54:36 +02:00
parent 8dc4844db8
commit 82cf5488a7
1 changed files with 2 additions and 2 deletions

View File

@ -392,8 +392,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
@ -404,8 +404,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