<p>Friendly Automation would like Joshua Colp to <strong>review</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/12837">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">AST-2019-005 - translate: Don't assume all frames will have a src.<br><br>This change removes the assumption that a frame will always have<br>a src set on it. This assumption is incorrect.<br><br>Given a scenario where an RTP packet is received with no payload<br>the resulting audio frame will have no samples. If this frame goes<br>through a signed linear translation path an interpolated frame can<br>be created (if generic packet loss concealment is enabled) that has<br>minimal data on it, including no src. If this frame is given to a<br>translation path a crash will occur due to the lack of src.<br><br>ASTERISK-28499<br><br>Change-Id: I024d10dd98207eb8a6b35b59880bcdf1090538f8<br>---<br>M main/translate.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/37/12837/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/translate.c b/main/translate.c</span><br><span>index fe46460..5542107 100644</span><br><span>--- a/main/translate.c</span><br><span>+++ b/main/translate.c</span><br><span>@@ -403,7 +403,7 @@</span><br><span> </span><br><span>       if (f->samples == 0) {</span><br><span>            /* Do not log empty audio frame */</span><br><span style="color: hsl(0, 100%, 40%);">-              if (strcasecmp(f->src, "ast_prod")) {</span><br><span style="color: hsl(120, 100%, 40%);">+            if (!f->src || strcasecmp(f->src, "ast_prod")) {</span><br><span>                     ast_log(LOG_WARNING, "no samples for %s\n", pvt->t->name);</span><br><span>           }</span><br><span>    }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/12837">change 12837</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/12837"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I024d10dd98207eb8a6b35b59880bcdf1090538f8 </div>
<div style="display:none"> Gerrit-Change-Number: 12837 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>