change strings.Builder to bytes.Buffer

pull/132/head
macbookpro 2019-01-27 11:55:51 +08:00
parent 21f4cdece4
commit 1abdf45a94
1 changed files with 2 additions and 2 deletions

View File

@ -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 {