diff --git a/format/ts/tsio/tsio.go b/format/ts/tsio/tsio.go index 9a7c37b..06e5874 100644 --- a/format/ts/tsio/tsio.go +++ b/format/ts/tsio/tsio.go @@ -549,7 +549,7 @@ func (self *TSWriter) WritePackets(w io.Writer, datav [][]byte, pcr time.Duratio } end = datavlen } - n := pio.VecSliceNoNew(datav, writev, writepos, end) + n := pio.VecSliceTo(datav, writev, writepos, end) self.tshdr[4] = byte(hdrlen)-5 // length if _, err = w.Write(self.tshdr[:hdrlen]); err != nil {