Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

注意:recorder/src/transform/transform.ts compress 函数可能存在数组溢出,48行和57行 #93

Open
chenYongZu opened this issue Jul 7, 2021 · 1 comment

Comments

@chenYongZu
Copy link

chenYongZu commented Jul 7, 2021

一次采集channels=2, sampleRate=8000, sampleBits=16的时候,发现使用ffplay播放到最后数据出错,排查发现,rData.length <= temp 或者lData.length <= temp的时候出现数组溢出情况。

@mfc6027
Copy link

mfc6027 commented Jan 6, 2022

我也发现了这个问题,可以通过修改length变量修正:
原:
const length = Math.floor((lData.length_+RData.length) / rate)
修改为:
let length = Math.floor(lData.length / rate)
if (rData.length) {
length *= 2
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants