Skip to content

Commit b0b887f

Browse files
committed
refactor: replace []byte(fmt.Sprintf) with fmt.Appendf
Signed-off-by: minxinyi <[email protected]>
1 parent 3a69e43 commit b0b887f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

media/rtp_segmenter_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ func (s *stubWriter) WriteOpus(track *mpegts.Track, pts int64, au [][]byte) erro
5151
func newStubTSWriter(w io.Writer, t []*mpegts.Track) MpegtsWriter {
5252
return &stubWriter{
5353
writeVideo: func(pts, dts int64, au [][]byte) error {
54-
w.Write([]byte(fmt.Sprintf("V%d ", pts)))
54+
w.Write(fmt.Appendf(nil, "V%d ", pts))
5555
return nil
5656
},
5757
writeAudio: func(pts int64, au [][]byte) error {
58-
w.Write([]byte(fmt.Sprintf("A%d ", pts)))
58+
w.Write(fmt.Appendf(nil, "A%d ", pts))
5959
return nil
6060
},
6161
}

0 commit comments

Comments
 (0)