infer object, sample rate, clock of MPEG4AudioLATM from config (#255)

This commit is contained in:
Alessandro Ros
2023-04-18 10:31:11 +02:00
committed by GitHub
parent df4d46c295
commit 2dc8838a6d
6 changed files with 208 additions and 74 deletions

View File

@@ -120,8 +120,13 @@ func (f *MPEG4AudioGeneric) RTPMap() string {
sampleRate = f.Config.ExtensionSampleRate
}
channelCount := f.Config.ChannelCount
if f.Config.ExtensionType == mpeg4audio.ObjectTypePS {
channelCount = 2
}
return "mpeg4-generic/" + strconv.FormatInt(int64(sampleRate), 10) +
"/" + strconv.FormatInt(int64(f.Config.ChannelCount), 10)
"/" + strconv.FormatInt(int64(channelCount), 10)
}
// FMTP implements Format.