fix pointer

This commit is contained in:
onyx-and-iris 2024-11-07 19:36:56 +00:00
parent be11239d39
commit 5a5a6fa893

View File

@ -22,7 +22,7 @@ type packet struct {
bpsIndex int bpsIndex int
channel int channel int
framecounter []byte framecounter []byte
hbuf bytes.Buffer hbuf *bytes.Buffer
} }
// newPacket returns a packet struct with default values, framecounter at 0. // newPacket returns a packet struct with default values, framecounter at 0.
@ -35,7 +35,7 @@ func newPacket(streamname string) packet {
bpsIndex: 0, bpsIndex: 0,
channel: 0, channel: 0,
framecounter: make([]byte, 4), framecounter: make([]byte, 4),
hbuf: *bytes.NewBuffer(make([]byte, headerSz)), hbuf: bytes.NewBuffer(make([]byte, headerSz)),
} }
} }