fix: setTracks filter media

This commit is contained in:
langhuihui
2023-10-08 13:01:51 +08:00
parent 688d339427
commit c982bd39f4

View File

@@ -27,6 +27,9 @@ func (p *RTSPPublisher) OnEvent(event any) {
func (p *RTSPPublisher) setTracks() {
for _, m := range p.Conn.Medias {
if m.Direction != core.DirectionRecvonly {
continue
}
for _, c := range m.Codecs {
var handler core.HandlerFunc
switch c.Name {