<p>Joshua Colp <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14974">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  George Joseph: Looks good to me, approved

</div><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;"><span>diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c</span><br><span>index 3749d7b..46bc4b9 100644</span><br><span>--- a/res/res_musiconhold.c</span><br><span>+++ b/res/res_musiconhold.c</span><br><span>@@ -477,7 +477,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/+/14974">change 14974</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/+/14974"/><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: Ib6b3c84fcaa1063889ab38ba7e7fc50050a3ccfc </div>
<div style="display:none"> Gerrit-Change-Number: 14974 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>