mirror of https://bitbucket.org/ausocean/av.git
Merged in err-check (pull request #459)
revid: check mtsEnc errors and fix codec strings Approved-by: Saxon Milton
This commit is contained in:
commit
fa374128c5
|
@ -297,7 +297,7 @@ var Variables = []struct {
|
|||
},
|
||||
{
|
||||
Name: KeyInputCodec,
|
||||
Type_: "enum:H264,H265,MJPEG,JPEG,PCM,ADPCM",
|
||||
Type_: "enum:h264,h265,mjpeg,jpeg,pcm,adpcm",
|
||||
Update: func(c *Config, v string) {
|
||||
c.InputCodec = v
|
||||
},
|
||||
|
|
|
@ -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 fmt.Errorf("error from setting up MTS encoder: %w", err)
|
||||
}
|
||||
encoders = append(encoders, e)
|
||||
}
|
||||
|
||||
|
@ -238,7 +241,7 @@ func (r *Revid) setupPipeline(mtsEnc func(dst io.WriteCloser, rate float64) (io.
|
|||
mw := multiWriter(flvSenders...)
|
||||
e, err := flvEnc(mw, int(r.cfg.FrameRate))
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("error from setting up FLV encoder: %w", err)
|
||||
}
|
||||
encoders = append(encoders, e)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue