change track initialization method

This commit is contained in:
aler9
2022-06-23 13:13:36 +02:00
parent 3223af460e
commit 9f4fea8a01
40 changed files with 765 additions and 706 deletions

View File

@@ -34,9 +34,14 @@ func main() {
log.Println("stream connected")
// create an AAC track
track, err := gortsplib.NewTrackAAC(96, 2, 48000, 2, nil, 13, 3, 3)
if err != nil {
panic(err)
track := &gortsplib.TrackAAC{
PayloadType: 96,
Type: 2,
SampleRate: 48000,
ChannelCount: 2,
SizeLength: 13,
IndexLength: 3,
IndexDeltaLength: 3,
}
// connect to the server and start publishing the track