flv: added back dans NewEncoder write fail code

This commit is contained in:
saxon 2019-01-11 23:39:49 +10:30
parent 61c1ff6ee4
commit 27081e1ea9
1 changed files with 3 additions and 0 deletions

View File

@ -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
}