-
Notifications
You must be signed in to change notification settings - Fork 73
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
mp4track录制,WriteTrailer后仍然占用内存 #104
Comments
多次录制用的是同一个Movmuxer 生成MP4文件? |
是的,同一个工具类,每新的录制new一次。 |
这个代码看起来没什么问题,只要Movmuxer对象 被gc回收,这两行代码所产生的内存也会被回收的 |
不同时长的mp4文件这些内存也是不一样,时长越长 占用内存越大
这个内存和帧数据大小有关 |
非常感谢,通过手动gc或设为nil都能解决。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我使用go-mp4录制H264的MP4文件,录制结束后正常关闭的文件流,也成功调用了WriteTrailer。
但多次录制后发现存在内存泄露的问题,通过pprof工具查看。每次录制结束后,go-mp4的内存占用逐步增加。
录制1分钟后:
list 定位到了go-mp4/mp4track.go文件
多次录制后(累计20分钟):
list 定位:
The text was updated successfully, but these errors were encountered: