Skip to content

Commit 686fb37

Browse files
committedMay 18, 2024
Remove PCMU for two way for DVRIP source #1111
1 parent 2b3e6a2 commit 686fb37

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎pkg/dvrip/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (c *Client) Play() error {
114114
}
115115

116116
func (c *Client) Talk() error {
117-
format := `{"Name":"OPTalk","SessionID":"0x%08X","OPTalk":{"Action":"%s","AudioFormat":{"EncodeType":"G711_ALAW"}}}` + "\x0A\x00"
117+
format := `{"Name":"OPTalk","SessionID":"0x%08X","OPTalk":{"Action":"%s","AudioFormat":{"EncodeType":"G711_ALAW"}}}` + "\x0A\x00"
118118

119119
data := fmt.Sprintf(format, c.session, "Claim")
120120
if _, err := c.WriteCmd(OPTalkClaim, []byte(data)); err != nil {

‎pkg/dvrip/dvrip.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ func Dial(url string) (core.Producer, error) {
2323
Kind: core.KindAudio,
2424
Direction: core.DirectionSendonly,
2525
Codecs: []*core.Codec{
26+
// leave only one codec here for better compatibility with cameras
27+
// https://github.com/AlexxIT/go2rtc/issues/1111
2628
{Name: core.CodecPCMA, ClockRate: 8000, PayloadType: 8},
27-
{Name: core.CodecPCMU, ClockRate: 8000, PayloadType: 0},
2829
},
2930
},
3031
}

0 commit comments

Comments
 (0)