Fix aac.DecodeConfig sampleRate parsing

This commit is contained in:
Alex X
2024-05-22 18:46:30 +03:00
parent 53242ea02f
commit 78a74da8d6
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -69,6 +69,8 @@ func DecodeConfig(b []byte) (objType, sampleFreqIdx, channels byte, sampleRate u
sampleFreqIdx = rd.ReadBits8(4)
if sampleFreqIdx == 0b1111 {
sampleRate = rd.ReadBits(24)
} else {
sampleRate = sampleRates[sampleFreqIdx]
}
channels = rd.ReadBits8(4)