diff --git a/stream/flv/encoder.go b/stream/flv/encoder.go index 4772a151..46d0eacb 100644 --- a/stream/flv/encoder.go +++ b/stream/flv/encoder.go @@ -73,6 +73,9 @@ func NewEncoder(dst io.Writer, audio, video bool, fps int) (*Encoder, error) { video: video, } _, err := dst.Write(e.HeaderBytes()) + if err != nil { + return nil, err + } return &e, err }