mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
change way tracks are initialized
A config object is now required to initialize tracks. Config objects are provided for H264 and AAC. This allows to pass parameters easily and treat AAC parameters explicitly.
This commit is contained in:
@@ -36,7 +36,7 @@ func main() {
|
||||
fmt.Println("stream connected")
|
||||
|
||||
// create a H264 track
|
||||
track, err := gortsplib.NewTrackH264(96, sps, pps)
|
||||
track, err := gortsplib.NewTrackH264(96, &gortsplib.TrackConfigH264{sps, pps})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user