{"record":{"id":"76914aa135782d10","repo":"pion/webrtc","slug":"file-not-opened","errorCode":null,"errorMessage":"file not opened","messagePattern":"file not opened","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/media/ivfwriter/ivfwriter.go","lineNumber":19,"sourceCode":"func NewWith(out io.Writer, opts ...Option) (*IVFWriter, error) {\n\tif out == nil {\n\t\treturn nil, errFileNotOpened\n\t}\n\n\twriter := &IVFWriter{\n\t\tioWriter:            out,\n\t\tseenKeyFrame:        false,\n\t\ttimebaseDenominator: 30,\n\t\ttimebaseNumerator:   1,\n\t\tclockRate:           90000,\n\t\tvideoWidth:          640,\n\t\tvideoHeight:         480,\n\t}\n\n\tfor _, o := range opts {\n\t\tif err := o(writer); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/pion/webrtc/blob/8c25dc09fa9e7c09aac4309ead88093d760432b0/pkg/media/ivfwriter/ivfwriter.go#L1-L37","documentation":"Sentinel error returned in two generic nil guards: ivfwriter.NewWith when the io.Writer argument is nil, and IVFWriter.WriteRTP when the writer's internal ioWriter is nil (e.g. after Close or when the writer was constructed improperly). It means there is no valid output destination to write IVF data to.","triggerScenarios":"Thrown at pkg/media/ivfwriter/ivfwriter.go:19 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-nil io.Writer to NewWith, e.g. a value from os.Create or a bytes.Buffer","Do not call WriteRTP after Close; reuse requires creating a new writer","Check that a constructed writer is non-nil before using it (NewWith returns an error alongside the nil writer)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c25dc09fa9e7c09aac4309ead88093d760432b0","analyzedAt":"2026-09-03T21:56:56.182Z","contentChangedAt":"2026-09-03T21:56:56.182Z","schemaVersion":2},"datasetVersion":"2026-09-11T07:07:21.782Z"}