mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
NewTrack*: fix control attribute
This commit is contained in:
8
track.go
8
track.go
@@ -45,6 +45,10 @@ func NewTrackH264(id int, sps []byte, pps []byte) (*Track, error) {
|
||||
"sprop-parameter-sets=" + spropParameterSets + "; " +
|
||||
"profile-level-id=" + profileLevelId,
|
||||
},
|
||||
{
|
||||
Key: "control",
|
||||
Value: "trackID=" + strconv.FormatInt(int64(id), 10),
|
||||
},
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
@@ -95,6 +99,10 @@ func NewTrackAac(id int, config []byte) (*Track, error) {
|
||||
"indexdeltalength=3; " +
|
||||
"config=" + hex.EncodeToString(config),
|
||||
},
|
||||
{
|
||||
Key: "control",
|
||||
Value: "trackID=" + strconv.FormatInt(int64(id), 10),
|
||||
},
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
|
Reference in New Issue
Block a user