mirror of https://bitbucket.org/ausocean/av.git
container/mts: not taking address of nopCloser
This commit is contained in:
parent
e5f95d1ea0
commit
1b06dae078
|
@ -50,7 +50,7 @@ func TestEncodePcm(t *testing.T) {
|
|||
sampleSize := 2
|
||||
blockSize := 16000
|
||||
writeFreq := float64(sampleRate*sampleSize) / float64(blockSize)
|
||||
e := NewEncoder(&nopCloser{&buf}, writeFreq, Audio)
|
||||
e := NewEncoder(nopCloser{&buf}, writeFreq, Audio)
|
||||
|
||||
inPath := "../../../test/test-data/av/input/sweep_400Hz_20000Hz_-3dBFS_5s_48khz.pcm"
|
||||
inPcm, err := ioutil.ReadFile(inPath)
|
||||
|
|
|
@ -48,7 +48,7 @@ const fps = 25
|
|||
func TestMetaEncode1(t *testing.T) {
|
||||
Meta = meta.New()
|
||||
var buf bytes.Buffer
|
||||
e := NewEncoder(&nopCloser{&buf}, fps, Video)
|
||||
e := NewEncoder(nopCloser{&buf}, fps, Video)
|
||||
Meta.Add("ts", "12345678")
|
||||
if err := e.writePSI(); err != nil {
|
||||
t.Errorf(errUnexpectedErr, err.Error())
|
||||
|
@ -76,7 +76,7 @@ func TestMetaEncode1(t *testing.T) {
|
|||
func TestMetaEncode2(t *testing.T) {
|
||||
Meta = meta.New()
|
||||
var buf bytes.Buffer
|
||||
e := NewEncoder(&nopCloser{&buf}, fps, Video)
|
||||
e := NewEncoder(nopCloser{&buf}, fps, Video)
|
||||
Meta.Add("ts", "12345678")
|
||||
Meta.Add("loc", "1234,4321,1234")
|
||||
if err := e.writePSI(); err != nil {
|
||||
|
|
Loading…
Reference in New Issue