Fix GetMedias for producer in reconnect state

This commit is contained in:
Alexey Khit
2023-01-08 21:42:13 +03:00
parent bd2fc1252d
commit 0e49ffdfff
+5
View File
@@ -55,6 +55,11 @@ func (p *Producer) GetMedias() []*streamer.Media {
p.state = stateMedias
}
// if element in reconnect state
if p.element == nil {
return nil
}
return p.element.GetMedias()
}