fix typo.

This commit is contained in:
Miroslav Šedivý 2021-10-02 13:51:22 +02:00
parent 8960fc2371
commit 74dbdea78a

View File

@ -54,10 +54,10 @@ func (peer *PeerStreamTrack) SetStream(stream types.StreamManager) error {
if peer.stream != nil {
err = peer.stream.MoveListenerTo(&peer.listener, stream)
} else {
err = peer.stream.AddListener(&peer.listener)
err = stream.AddListener(&peer.listener)
}
if err != nil {
if err == nil {
peer.stream = stream
}