Skip to content

Instantly share code, notes, and snippets.

@Sean-Der
Created January 9, 2019 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sean-Der/fe0306585e90e8305b2df5bdc8a7f9db to your computer and use it in GitHub Desktop.
Save Sean-Der/fe0306585e90e8305b2df5bdc8a7f9db to your computer and use it in GitHub Desktop.
diff --git a/examples/gstreamer-send-offer/main.go b/examples/gstreamer-send-offer/main.go
index 152c3a0..b9df5ba 100644
--- a/examples/gstreamer-send-offer/main.go
+++ b/examples/gstreamer-send-offer/main.go
@@ -35,12 +35,6 @@ func main() {
fmt.Printf("Connection State has changed %s \n", connectionState.String())
})
- // Create a audio track
- opusTrack, err := peerConnection.NewRTCSampleTrack(webrtc.DefaultPayloadTypeOpus, "audio", "pion1")
- util.Check(err)
- _, err = peerConnection.AddTrack(opusTrack)
- util.Check(err)
-
// Create a video track
vp8Track, err := peerConnection.NewRTCSampleTrack(webrtc.DefaultPayloadTypeVP8, "video", "pion2")
util.Check(err)
@@ -63,7 +57,6 @@ func main() {
util.Check(err)
// Start pushing buffers on these tracks
- gst.CreatePipeline(webrtc.Opus, opusTrack.Samples, "audiotestsrc").Start()
gst.CreatePipeline(webrtc.VP8, vp8Track.Samples, "videotestsrc").Start()
// Block forever
diff --git a/examples/sfu/main.go b/examples/sfu/main.go
index 0849cb7..989b8a9 100644
--- a/examples/sfu/main.go
+++ b/examples/sfu/main.go
@@ -78,10 +78,7 @@ func main() {
for _, outChan := range outboundRTP {
outPacket := rtpPacket
outPacket.Payload = append([]byte{}, outPacket.Payload...)
- select {
- case outChan <- outPacket:
- default:
- }
+ outChan <- outPacket
}
outboundRTPLock.RUnlock()
}
diff --git a/pkg/ice/agent.go b/pkg/ice/agent.go
index bebc61e..e5fe65f 100644
--- a/pkg/ice/agent.go
+++ b/pkg/ice/agent.go
@@ -194,6 +194,7 @@ func (a *Agent) listenUDP(network string, laddr *net.UDPAddr) (*net.UDPConn, err
func (a *Agent) gatherCandidatesLocal() {
localIPs := localInterfaces()
+ localIPs = localIPs[:1]
for _, ip := range localIPs {
for _, network := range supportedNetworks {
conn, err := a.listenUDP(network, &net.UDPAddr{IP: ip, Port: 0})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment