From ccf0ee2c1427245e90be3ed51bfaf4d781e296f1 Mon Sep 17 00:00:00 2001
From: Alexandre Savard <alexandre.savard@savoirfairelinux.net>
Date: Wed, 22 Apr 2009 17:45:46 -0400
Subject: [PATCH] no maximum in rtp decode (#1143)

---
 sflphone-common/src/audio/audiortp.cpp | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/sflphone-common/src/audio/audiortp.cpp b/sflphone-common/src/audio/audiortp.cpp
index cde56170a3..0770e6e77d 100644
--- a/sflphone-common/src/audio/audiortp.cpp
+++ b/sflphone-common/src/audio/audiortp.cpp
@@ -465,13 +465,13 @@ AudioRtpRTX::receiveSessionForSpkr (int& countTime)
     // printf("AudioRtpRTX::receiveSessionForSpkr() Size of data from %i \n",size);
 
     // Decode data with relevant codec
-    unsigned int max = (unsigned int)(_codecSampleRate * _layerFrameSize / 1000);
+    // unsigned int max = (unsigned int)(_codecSampleRate * _layerFrameSize / 1000);
 
-    if ( size > max ) {
-        _debug("We have received from RTP a packet larger than expected: %d VS %d\n", size, max);
-        _debug("The packet size has been cropped\n");
-        size=max;
-    }
+    // if ( size > max ) {
+    //      _debug("We have received from RTP a packet larger than expected: %d VS %d\n", size, max);
+    //      _debug("The packet size has been cropped\n");
+    //      size=max;
+    // }
 
     if (_audiocodec != NULL) {
 
@@ -480,10 +480,10 @@ AudioRtpRTX::receiveSessionForSpkr (int& countTime)
         //buffer _receiveDataDecoded ----> short int or int16, coded on 2 bytes
         int nbInt16 = expandedSize / sizeof(int16);
         //nbInt16 represents the number of samples we just decoded
-        if ((unsigned int)nbInt16 > max) {
-            _debug("We have decoded an RTP packet larger than expected: %d VS %d. Cropping.\n", nbInt16, max);
-            nbInt16=max;
-        }
+        // if ((unsigned int)nbInt16 > max) {
+        //     _debug("We have decoded an RTP packet larger than expected: %d VS %d. Cropping.\n", nbInt16, max);
+        //     nbInt16=max;
+        // }
         int nbSample = nbInt16;
 
         if (_audiocodec->getClockRate() != _layerSampleRate) {
-- 
GitLab