support sampling rates different than 48khz when reading with RTMP

This commit is contained in:
aler9 2021-03-24 19:47:05 +01:00
parent 2382337c07
commit 8b427ba323
1 changed files with 2 additions and 1 deletions

View File

@ -277,7 +277,8 @@ func (c *Client) runRead() {
Data: aacConfig,
})
c.aacDecoder = rtpaac.NewDecoder(48000)
clockRate, _ := audioTrack.ClockRate()
c.aacDecoder = rtpaac.NewDecoder(clockRate)
c.audioTrack = audioTrack
}