revid: check the error returned from mtsEnc

This commit is contained in:
Trek H 2021-03-13 02:33:59 +10:30
parent cd3d2388d6
commit bd76fc3449
1 changed files with 4 additions and 1 deletions

View File

@ -227,7 +227,10 @@ func (r *Revid) setupPipeline(mtsEnc func(dst io.WriteCloser, rate float64) (io.
// as a destination.
if len(mtsSenders) != 0 {
mw := multiWriter(mtsSenders...)
e, _ := mtsEnc(mw, float64(r.cfg.FrameRate))
e, err := mtsEnc(mw, float64(r.cfg.FrameRate))
if err != nil {
return err
}
encoders = append(encoders, e)
}