mirror of
https://github.com/3d0c/gmf
synced 2025-12-24 10:40:59 +08:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user