From 52631b92240ec86446a27d86e1dd73f6ae729029 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Mon, 28 Nov 2022 18:29:10 +0900 Subject: [PATCH] Prevent errors for SDP parsing in recent GStreamer versions --- src/selkies_gstreamer/gstwebrtc_app.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/selkies_gstreamer/gstwebrtc_app.py b/src/selkies_gstreamer/gstwebrtc_app.py index a14d1dad..e814beec 100644 --- a/src/selkies_gstreamer/gstwebrtc_app.py +++ b/src/selkies_gstreamer/gstwebrtc_app.py @@ -657,8 +657,7 @@ def set_sdp(self, sdp_type, sdp): if sdp_type != 'answer': raise GSTWebRTCAppError('ERROR: sdp type was not "answer"') - _, sdpmsg = GstSdp.SDPMessage.new() - GstSdp.sdp_message_parse_buffer(bytes(sdp.encode()), sdpmsg) + _, sdpmsg = GstSdp.SDPMessage.new_from_text(sdp) answer = GstWebRTC.WebRTCSessionDescription.new( GstWebRTC.WebRTCSDPType.ANSWER, sdpmsg) promise = Gst.Promise.new()