From 13d228b44e1f22ec72a47a4cd53793b7d9a0823d Mon Sep 17 00:00:00 2001 From: Sean DuBois Date: Sat, 21 Sep 2024 12:14:00 -0400 Subject: [PATCH] Use media name and not mid to find audio/video Can't depend on audio/video being a mid name --- src/peer_connection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/peer_connection.c b/src/peer_connection.c index 16e625f..8659f4a 100644 --- a/src/peer_connection.c +++ b/src/peer_connection.c @@ -479,9 +479,9 @@ void peer_connection_set_remote_description(PeerConnection* pc, const char* sdp_ is_update = 1; } - if (strstr(buf, "a=mid:video")) { + if (strstr(buf, "m=video")) { ssrc = &pc->remote_vssrc; - } else if (strstr(buf, "a=mid:audio")) { + } else if (strstr(buf, "m=audio")) { ssrc = &pc->remote_assrc; }