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

录制flv格式文件出现了discard错误 #39

Open
hydaizd opened this issue Aug 9, 2024 · 0 comments
Open

录制flv格式文件出现了discard错误 #39

hydaizd opened this issue Aug 9, 2024 · 0 comments

Comments

@hydaizd
Copy link

hydaizd commented Aug 9, 2024

当接入摄像头的数量超过服务器的cpu数量时,此处虽然使用了协程的方式执行writeMetaData函数,但仍有可能触发discard错误。

func (r *FLVRecorder) Close() error {
	if r.File != nil {
		if !r.append {
			go r.writeMetaData(r.File, r.duration)
		} else {
			return r.File.Close()
		}
	}
	return nil
}
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

1 participant