Only receive RTP audio data, if connected to remote.
[lcr.git] / 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;