<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14931">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_musiconhold: Start playlist after initial announcement<br><br>Only track our sample offset if we are playing a non-announcement file,<br>otherwise we will skip that number of samples when we start playing the<br>first MoH file.<br><br>ASTERISK-24329 #close<br><br>Change-Id: Ib6b3c84fcaa1063889ab38ba7e7fc50050a3ccfc<br>---<br>M res/res_musiconhold.c<br>1 file changed, 6 insertions(+), 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/31/14931/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c</span><br><span>index b229f4d..eac434d 100644</span><br><span>--- a/res/res_musiconhold.c</span><br><span>+++ b/res/res_musiconhold.c</span><br><span>@@ -475,7 +475,12 @@</span><br><span>                      return -1;</span><br><span>           }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-           state->samples += f->samples;</span><br><span style="color: hsl(120, 100%, 40%);">+           /* Only track our offset within the current file if we are not in the</span><br><span style="color: hsl(120, 100%, 40%);">+          * the middle of an announcement */</span><br><span style="color: hsl(120, 100%, 40%);">+           if (!state->announcement) {</span><br><span style="color: hsl(120, 100%, 40%);">+                        state->samples += f->samples;</span><br><span style="color: hsl(120, 100%, 40%);">+           }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>          state->sample_queue -= f->samples;</span><br><span>             if (ast_format_cmp(f->subclass.format, state->mohwfmt) == AST_FORMAT_CMP_NOT_EQUAL) {</span><br><span>                  ao2_replace(state->mohwfmt, f->subclass.format);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14931">change 14931</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/+/14931"/><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-Change-Id: Ib6b3c84fcaa1063889ab38ba7e7fc50050a3ccfc </div>
<div style="display:none"> Gerrit-Change-Number: 14931 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>