From 1abdf45a940372114260c2c1f7563e6a05a8a9a4 Mon Sep 17 00:00:00 2001 From: macbookpro Date: Sun, 27 Jan 2019 11:55:51 +0800 Subject: [PATCH] change strings.Builder to bytes.Buffer --- rtsp/rtsp-client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtsp/rtsp-client.go b/rtsp/rtsp-client.go index c6b65120..d6189f2f 100644 --- a/rtsp/rtsp-client.go +++ b/rtsp/rtsp-client.go @@ -428,7 +428,7 @@ func (client *RTSPClient) startStream() { } default: // rtsp - builder := strings.Builder{} + builder := bytes.Buffer{} builder.WriteByte(b) contentLen := 0 for !client.Stoped { @@ -519,7 +519,7 @@ func (client *RTSPClient) RequestWithPath(method string, path string, headers ma } client.Seq++ cseq := client.Seq - builder := strings.Builder{} + builder := bytes.Buffer{} builder.WriteString(fmt.Sprintf("%s %s RTSP/1.0\r\n", method, path)) builder.WriteString(fmt.Sprintf("CSeq: %d\r\n", cseq)) for k, v := range headers {