func (w *TestWriter) Write(p []byte) (int, error) {
	w.count++
	w.buf = p
	return len(p), nil
}
Write write p to w.buf
package ts
import (
	"testing"
	"github.com/gwuhaolin/livego/av"
	"github.com/stretchr/testify/assert"
)
type TestWriter struct {
	buf   []byte
	count int
}