diff --git a/pkg/core/media.go b/pkg/core/media.go index 2284d0cd..72ab58c6 100644 --- a/pkg/core/media.go +++ b/pkg/core/media.go @@ -124,9 +124,13 @@ func MarshalSDP(name string, medias []*Media) ([]byte, error) { codec := media.Codecs[0] - name := codec.Name - if name == CodecELD { + switch codec.Name { + case CodecELD: name = CodecAAC + case CodecPCML: + name = CodecPCM // beacuse we using pcm.LittleToBig for RTSP server + default: + name = codec.Name } md := &sdp.MediaDescription{ diff --git a/pkg/rtsp/consumer.go b/pkg/rtsp/consumer.go index b6df188f..860ed113 100644 --- a/pkg/rtsp/consumer.go +++ b/pkg/rtsp/consumer.go @@ -162,6 +162,8 @@ func (c *Conn) packetWriter(codec *core.Codec, channel, payloadType uint8) core. case core.CodecJPEG: handlerFunc = mjpeg.RTPPay(handlerFunc) } + } else if codec.Name == core.CodecPCML { + handlerFunc = pcm.LittleToBig(handlerFunc) } else if c.PacketSize != 0 { switch codec.Name { case core.CodecH264: