mirror of https://bitbucket.org/ausocean/av.git
revid: don't need to make new r.encoder each time just do r.encoder = r.encoder[:0]
This commit is contained in:
parent
2bd17d0296
commit
a061a79805
|
@ -181,7 +181,7 @@ func (r *Revid) setConfig(config Config) error {
|
||||||
func (r *Revid) setupPipeline(mtsEnc, flvEnc func(dst io.Writer, rate int) (io.Writer, error), multiWriter func(...io.Writer) io.Writer) error {
|
func (r *Revid) setupPipeline(mtsEnc, flvEnc func(dst io.Writer, rate int) (io.Writer, error), multiWriter func(...io.Writer) io.Writer) error {
|
||||||
r.buffer = (*buffer)(ring.NewBuffer(ringBufferSize, ringBufferElementSize, writeTimeout))
|
r.buffer = (*buffer)(ring.NewBuffer(ringBufferSize, ringBufferElementSize, writeTimeout))
|
||||||
|
|
||||||
r.encoder = make([]io.Writer, 0)
|
r.encoder = r.encoder[:0]
|
||||||
|
|
||||||
// mtsSenders will hold the senders the require MPEGTS encoding, and flvSenders
|
// mtsSenders will hold the senders the require MPEGTS encoding, and flvSenders
|
||||||
// will hold senders that require FLV encoding.
|
// will hold senders that require FLV encoding.
|
||||||
|
|
Loading…
Reference in New Issue