[webrtc-pc] Modifications to [[SendEncodings]] from setParameters and sRD can be racy (#2737)

docfaraday has just created a new issue for https://github.com/w3c/webrtc-pc:

== Modifications to [[SendEncodings]] from setParameters and sRD can be racy ==
setParameters has the following flow in brief:

1. Synchronously executed state and validity checking
2. In parallel, apply the new parameters to the RTP stream being transmitted (might involve queuing, might not)
3. A queued task (that is enqueued during step 2) that updates [[SendEncodings]], and then resolves the promise

sRD(answer) can reject an offered simulcast, which also results in a modification to [[SendEncodings]] (by truncating to size 1). It seems like it would be fairly easy for a message handler to call sRD(answer) so that the truncation happens between steps 1 and 2, or steps 2 and 3.

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2737 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 16 May 2022 19:21:59 UTC