From 099a87cd11597e9a5e90aae64222f815edcbcd24 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Sat, 3 Oct 2020 23:46:11 +0200 Subject: [PATCH] NewTrack*: fix control attribute --- track.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/track.go b/track.go index 64309790..f4d116fa 100644 --- a/track.go +++ b/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