Update encoding.go to wrap error messages

`fatal(.)` requires error interface, hence the error messages need to be wrapped with `errors.New(.)`.
This commit is contained in:
Marko Ristin
2018-12-04 14:43:19 +01:00
committed by GitHub
parent a0ded7eab1
commit db3eae4bce

View File

@@ -23,13 +23,13 @@ func main() {
videoEncCtx := NewCodecCtx(codec)
if videoEncCtx == nil {
fatal("failed to create a new codec context")
fatal(errors.New("failed to create a new codec context"))
}
defer Release(videoEncCtx)
outputCtx, err := NewOutputCtx(outputfilename)
if err != nil {
fatal("failed to create a new output context")
fatal(errors.New("failed to create a new output context"))
}
videoEncCtx.