Skip to content

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

@hydaizd

Description

@hydaizd

当接入摄像头的数量超过服务器的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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions