awslabs / amazon-kinesis-video-streams-webrtc-sdk-c

Amazon Kinesis Video Streams Webrtc SDK is for developers to install and customize realtime communication between devices and enable secure streaming of video, audio to Kinesis Video Streams.
https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-c/group__PublicMemberFunctions.html
Apache License 2.0
994 stars 297 forks source link

[Bug]: Seemingly SessionDescription creation bug #2007

Open wei-zhang-simplisafe opened 3 weeks ago

wei-zhang-simplisafe commented 3 weeks ago

Please confirm you have already done the following

Please answer the following prompt

Describe the bug

This line looks wrong: https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c/blob/master/src/source/PeerConnection/SessionDescription.c?plain=1#L659 The SPRTINTF will be overwritten by the next SPRINTF: https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c/blob/master/src/source/PeerConnection/SessionDescription.c?plain=1#L662

nack feature is supported by webrtc SDK, so these lines should be in the SDP: a=rtcp-fb:125 nack a=rtcp-fb:125 nack pli

But because of the above issue, only "a=rtcp-fb:125 nack pli" is in the SDP. Some peer doesn't know webrtc SDK supports NACK, so won't send NACK RTCP packets.

Expected Behavior

These lines should be in the SDP: a=rtcp-fb:125 nack a=rtcp-fb:125 nack pli

Current Behavior

Only a=rtcp-fb:125 nack pli is in the SDP

Reproduction Steps

Run sample code, and check the SDP text

WebRTC C SDK version being used

Most recent code base

If it was working in a previous version, which one?

No

Compiler and Version used

Any compiler

Operating System and version

any OS

Platform being used

any platform

disa6302 commented 1 week ago

It does look like a bug. Thanks @wei-zhang-simplisafe ! Will get this fixed.