This commit is contained in:
Dimitrii Lopanov 2024-06-20 14:34:23 +00:00 committed by GitHub
commit 3325161207
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View File

@ -202,7 +202,7 @@ func (self *Client) SendRtpKeepalive() (err error) {
fmt.Println("rtp: keep alive")
}
req := Request{
Method: "OPTIONS",
Method: "GET_PARAMETER",
Uri: self.requestUri,
}
if self.session != "" {

View File

@ -4,6 +4,7 @@ import (
"fmt"
"github.com/deepch/vdk/codec/h265parser"
"io"
"sync"
"time"
"github.com/deepch/vdk/av"
@ -15,9 +16,9 @@ import (
var CodecTypes = []av.CodecType{av.H264, av.H265, av.AAC}
type Muxer struct {
w io.Writer
streams map[int]*Stream
w io.Writer
streams map[int]*Stream
mutex sync.Mutex
PaddingToMakeCounterCont bool
psidata []byte
@ -64,6 +65,10 @@ func (self *Muxer) newStream(idx int, codec av.CodecData) (err error) {
pid: pid,
tsw: tsio.NewTSWriter(pid),
}
defer self.mutex.Unlock()
self.mutex.Lock()
self.streams[idx] = stream
return
}