webrtc: Attempt to create FEC decoder for a datachannel causes pipeline failure
Since the introduction of commit b7d0ddd1 the attached example fails with the following printout:
(webrtc:1170262): GStreamer-CRITICAL **: 14:59:42.660: Padname src_0 is not unique in element the_webrtcbin, not adding
The example code creates two webrtcbins, a sender that streams the content of a videotestsrc and a receiver that displays the content using autovideosink. The sender also opens a data channel and it seems to be the data channel that triggers the failure. For some reason I can't fully understand there is a packet reaching GstRtpPtDemux that has payload type 0 and then eventually webrtcbin is queried for the caps of that payload type. It finds the datachannel part of the sdp and somehow treats that as an rtp participant. A ULPFEC decoder is created for it and then the failure occurs when trying to create a src pad for it in rtpbin.
The problem disappears if I hack _update_transport_ptmap_from_media() in gstwebrtcbin.c to not include the datachannel in the ptmap. However, I admit I only understand a fraction of what's going on here so I decided to make this an issue rather than suggesting a merge request.
BTW, I saw issue #928 (closed) mentioned the same error printout but I couldn't really see it had the same root cause.