NewTrack*: fix control attribute

This commit is contained in:
aler9
2020-10-03 23:46:11 +02:00
parent 63ddab9da5
commit 099a87cd11

View File

@@ -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