Fix PCM audio from Hikvision cameras

This commit is contained in:
Alex X
2024-07-26 14:01:43 +03:00
parent c5bc761a52
commit 68fa42249e
2 changed files with 38 additions and 1 deletions
+6 -1
View File
@@ -157,7 +157,12 @@ func UnmarshalCodec(md *sdp.MediaDescription, payloadType string) *Codec {
}
}
if c.Name == "" {
switch c.Name {
case "PCM":
// https://www.reddit.com/r/Hikvision/comments/17elxex/comment/k642g2r/
// check pkg/rtsp/rtsp_test.go TestHikvisionPCM
c.Name = CodecPCML
case "":
// https://en.wikipedia.org/wiki/RTP_payload_formats
switch payloadType {
case "0":