rtsp source: improve support for AAC tracks with custom parameters

This commit is contained in:
aler9
2022-04-15 17:01:18 +02:00
parent db7ee22789
commit 6b86607092
6 changed files with 30 additions and 11 deletions

View File

@@ -144,8 +144,11 @@ func (s *rtmpSource) runInner() bool {
var aacEncoder *rtpaac.Encoder
if audioTrack != nil {
aacEncoder = &rtpaac.Encoder{
PayloadType: 97,
SampleRate: audioTrack.ClockRate(),
PayloadType: 97,
SampleRate: audioTrack.ClockRate(),
SizeLength: 13,
IndexLength: 3,
IndexDeltaLength: 3,
}
aacEncoder.Init()
audioTrackID = len(tracks)