diff --git a/container/mts/mpegts_test.go b/container/mts/mpegts_test.go index 3bd7bf59..eed1162a 100644 --- a/container/mts/mpegts_test.go +++ b/container/mts/mpegts_test.go @@ -33,7 +33,7 @@ func TestGetPTSRange(t *testing.T) { var clip bytes.Buffer // Write the PSI first. - err := writePSI(clip) + err := writePSI(&clip) if err != nil { t.Fatalf("did not expect error writing psi: %v", err) } @@ -43,7 +43,7 @@ func TestGetPTSRange(t *testing.T) { for _, frame := range frames { nextPTS := curTime * ptsFreq - err = writeFrame(clip, frame, uint64(nextPTS)) + err = writeFrame(&clip, frame, uint64(nextPTS)) if err != nil { t.Fatalf("did not expect error writing frame: %v", err) } @@ -63,7 +63,7 @@ func TestGetPTSRange(t *testing.T) { } // writePSI is a helper function write the PSI found at the start of a clip. -func writePSI(b bytes.Buffer) error { +func writePSI(b *bytes.Buffer) error { // Write PAT. pat := Packet{ PUSI: true, @@ -95,7 +95,7 @@ func writePSI(b bytes.Buffer) error { // writeFrame is a helper function used to form a PES packet from a frame, and // then fragment this across MPEGTS packets where they are then written to the // given buffer. -func writeFrame(b bytes.Buffer, frame []byte, pts uint64) error { +func writeFrame(b *bytes.Buffer, frame []byte, pts uint64) error { // Prepare PES data. pesPkt := pes.Packet{ StreamID: videoStreamID,