<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:alex&#64;igalia.com" title="Alejandro G. Castro &lt;alex&#64;igalia.com&gt;"> <span class="fn">Alejandro G. Castro</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [WebRTC] Fix final mid of a transceiver"
   href="https://bugs.webkit.org/show_bug.cgi?id=169919">bug 169919</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #305006 Flags</td>
           <td>review?
           </td>
           <td>review-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [WebRTC] Fix final mid of a transceiver"
   href="https://bugs.webkit.org/show_bug.cgi?id=169919#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [WebRTC] Fix final mid of a transceiver"
   href="https://bugs.webkit.org/show_bug.cgi?id=169919">bug 169919</a>
              from <span class="vcard"><a class="email" href="mailto:alex&#64;igalia.com" title="Alejandro G. Castro &lt;alex&#64;igalia.com&gt;"> <span class="fn">Alejandro G. Castro</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=305006&amp;action=diff" name="attach_305006" title="Patch">attachment 305006</a> <a href="attachment.cgi?id=305006&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=305006&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=305006&amp;action=review</a>

Thanks for the patch, can you explain how we can reproduce this issue?

<span class="quote">&gt; Source/WebCore/ChangeLog:3
&gt; +        [WebRTC] Fix final mid of a transceiver</span >

Try to be more descriptive explaining the issue with the title, instead of explaining how you fix it, such as: Problem when setting final mid for the ...

<span class="quote">&gt; Source/WebCore/ChangeLog:9
&gt; +        (WebCore::MediaEndpointPeerConnection::setLocalDescriptionTask):</span >

Add here the comments about the changes you did.

<span class="quote">&gt; Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:374
&gt;              RTCRtpTransceiver* transceiver = matchTransceiver(transceivers, [&amp;mediaDescription] (RTCRtpTransceiver&amp; current) {
&gt; -                return current.provisionalMid() == mediaDescription.mid;
&gt; +                return current.mid().isNull() &amp;&amp; current.sender().trackKind() == mediaDescription.type;
&gt;              });
&gt;              if (transceiver)
&gt; -                transceiver-&gt;setMid(transceiver-&gt;provisionalMid());
&gt; +                transceiver-&gt;setMid(mediaDescription.mid);</span >

I don't understand the solution, the matchTransceiver function makes sure the provisionalMid and the mediaDescription mid are the same value, and the transceiver exist, so it should be safe to assign the provisionalMid in that situation. Also your change of the matchTransceiver function is not matching correctly because there could be multiple tracks with the same type.

I think if the payload of a mediaDescription does not match and their mids match the problem should be somewhere else.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>