Hi,
I am trying to modify the peerconnection client example to
create an SCTP datachannel. I want it to work between two native
clients.
I create the peerconnection object with the constraint
kEnableDtlsSrtp, and then I call its CreateDataChannel method. Then sdp
are exchanged and when the answer is received, I get an error in
SetRemoteDescription: "Failed to set data receive codecs". Immediately
after SetRemoteDescription I get a segmentation fault on
session_description->type().
If I set "local_port_" manually to the SCTP port number
in SctpDataMediaChannel::SetRecvCodecs, I can establish a connection and exchange data using the datachannel, but I get an error (in srtpfilter.cc) "Failed to unprotect SRTP packet, err=2", and (in channel.cc) "Failed to unprotect audio RTP packet:" and "Failed to unprotect video RTP packet:".
Why do I get an error if I do not set "local_port_" like that ? Why do I still get errors if I do ?
Thanks !
Nicolas