diff --git a/pkg/mp4/consumer.go b/pkg/mp4/consumer.go index 13542c58..069016cb 100644 --- a/pkg/mp4/consumer.go +++ b/pkg/mp4/consumer.go @@ -138,11 +138,15 @@ func (c *Consumer) AddTrack(media *core.Media, _ *core.Codec, track *core.Receiv codec.Name = core.CodecFLAC default: - println("ERROR: MP4 unsupported codec: " + track.Codec.Name) - return nil + handler.Handler = nil } } + if handler.Handler == nil { + println("ERROR: MP4 unsupported codec: " + track.Codec.String()) + return nil + } + handler.HandleRTP(track) c.senders = append(c.senders, handler)