Only receive RTP audio data, if connected to remote.
authorAndreas Eversberg <jolly@eversberg.eu>
Sun, 20 May 2012 14:37:27 +0000 (16:37 +0200)
committerAndreas Eversberg <jolly@eversberg.eu>
Sun, 20 May 2012 14:37:27 +0000 (16:37 +0200)
sip.cpp

diff --git a/sip.cpp b/sip.cpp
index 5358fb4..ee455a8 100644 (file)
--- a/sip.cpp
+++ b/sip.cpp
@@ -285,7 +285,8 @@ static int rtp_sock_callback(struct lcr_fd *fd, unsigned int what, void *instanc
 //                     psip->rtp_shutdown();
                        return len;
                }
-               rc = rtp_decode(psip, buffer, len);
+               if (psip->p_s_rtp_is_connected)
+                       rc = rtp_decode(psip, buffer, len);
        }
 
        return rc;