Skip to content

fix: prevent media type mismatch in closed media section reuse#363

Open
duyjack wants to merge 2 commits intoversatica:v3from
duyjack:v3
Open

fix: prevent media type mismatch in closed media section reuse#363
duyjack wants to merge 2 commits intoversatica:v3from
duyjack:v3

Conversation

@duyjack
Copy link
Copy Markdown

@duyjack duyjack commented Apr 1, 2026

Description

Fix an issue in RemoteSdp.receive() where closed media sections could be recycled
regardless of their media type, potentially causing type mismatch errors.

Changes

  • Updated the condition for finding recyclable closed media sections
  • Now checks that both m.closed == true AND m.getObject().type === kind
  • This ensures only closed sections with matching media kinds (audio/video/etc) are reused

Motivation

Previously, the code could recycle a closed m=audio section for new m=video media,
which would cause type inconsistencies. The updated logic ensures type compatibility
when attempting to reuse closed media sections.

Testing

This fix prevents potential mismatches between the media section type and the requested kind,
improving the robustness of SDP media section management.

@jmillan
Copy link
Copy Markdown
Member

jmillan commented Apr 3, 2026

Thanks @duyjack , we'll review and check in the following days.

@jmillan
Copy link
Copy Markdown
Member

jmillan commented Apr 7, 2026

This will take few more days as we'd like to make a further research and are currently short on time.

@Astagor
Copy link
Copy Markdown

Astagor commented Apr 10, 2026

My FF users are getting angry. Any info about the fix date? Also please see this #364 (comment) there might other things to fix for FF.

@ibc
Copy link
Copy Markdown
Member

ibc commented Apr 10, 2026

My FF users are getting angry. Any info about the fix date? Also please see this #364 (comment) there might other things to fix for FF.

We are on vacation. Will check this on our arrival to normal life. Please open a separate ticket for that different issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants