<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/7237">View Change</a></p><p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p>(6 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/7237/1/res/res_rtp_asterisk.c">File res/res_rtp_asterisk.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7237/1/res/res_rtp_asterisk.c@117">Patch Set #1, Line 117:</a> <code style="font-family:monospace,monospace">#define DEFAULT_LEARNING_MIN_DURATION 30</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Should express this value in terms of DEFAULT_LEARNING_MIN_SEQUENTIAL since they are related.  Also should have another macro to calculate the value.</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">/*!<br> * \brief Calculate the min learning duration in ms.<br> *<br> * \details<br> * The min supported packet size represents 10 ms and we need to account<br> * for some jitter and fast clocks while learning.  Some messed up devices<br> * have very bad jitter for a small packet sample size.  Jitter can also<br> * be introduced by the network itself.<br> *<br> * So we'll allow packets to come in every 9ms on average for fast clocking<br> * with the last one coming in 5ms early for jitter.<br> */<br>#define CALC_LEARNING_MIN_DURATION(count) (((count) - 1) * 9 - 5)</pre><p style="white-space: pre-wrap; word-wrap: break-word;">#define DEFAULT_LEARNING_MIN_DURATION CALC_LEARNING_MIN_DURATION(DEFAULT_LEARNING_MIN_SEQUETIAL)</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7237/1/res/res_rtp_asterisk.c@2786">Patch Set #1, Line 2786:</a> <code style="font-family:monospace,monospace">{    </code></p><p style="white-space: pre-wrap; word-wrap: break-word;">red blob</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7237/1/res/res_rtp_asterisk.c@2795">Patch Set #1, Line 2795:</a> <code style="font-family:monospace,monospace">    </code></p><p style="white-space: pre-wrap; word-wrap: break-word;">red blob</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7237/1/res/res_rtp_asterisk.c@2796">Patch Set #1, Line 2796:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">       /*<br>     * During the learning mode the minimum amount of media we'll accept is<br>    * 10ms. So check whether we have received the four packets in less than<br>       * a reasonable amount of time. */<br></pre></blockquote></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">/*<br> * Protect against packet floods by checking that we<br> * received the packet sequence in at least the minimum<br> * allowed time.<br> */</pre></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7237/1/res/res_rtp_asterisk.c@6555">Patch Set #1, Line 6555:</a> <code style="font-family:monospace,monospace">               if ((sscanf(s, "%d", &learning_min_sequential) <= 0) || learning_min_sequential <= 0) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Setting learning_min_sequential to 1 is not good.  It would set the learning_min_duration to an invalid value.  The minimum needs to be at least 2.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7237/1/res/res_rtp_asterisk.c@6560">Patch Set #1, Line 6560:</a> <code style="font-family:monospace,monospace">              learning_min_duration = (learning_min_sequential - 1) * 10;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">learning_min_duration = CALC_LEARNING_MIN_DURATION(learning_min_sequential);</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/7237">change 7237</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7237"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: If778fe07678a6fd2041eaca7cd78267d0ef4fc6c </div>
<div style="display:none"> Gerrit-Change-Number: 7237 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pirmin Walthert <infos@nappsoft.ch> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 17 Nov 2017 02:28:13 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>