mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 23:26:54 +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 + "; " +
|
"sprop-parameter-sets=" + spropParameterSets + "; " +
|
||||||
"profile-level-id=" + profileLevelId,
|
"profile-level-id=" + profileLevelId,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Key: "control",
|
||||||
|
Value: "trackID=" + strconv.FormatInt(int64(id), 10),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
@@ -95,6 +99,10 @@ func NewTrackAac(id int, config []byte) (*Track, error) {
|
|||||||
"indexdeltalength=3; " +
|
"indexdeltalength=3; " +
|
||||||
"config=" + hex.EncodeToString(config),
|
"config=" + hex.EncodeToString(config),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Key: "control",
|
||||||
|
Value: "trackID=" + strconv.FormatInt(int64(id), 10),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
|
Reference in New Issue
Block a user