protocol/rtp/client.go: initialising PacketReader now to fix build runtime panic

This commit is contained in:
Saxon 2019-05-11 22:04:37 +09:30
parent 6acc2d7376
commit 4f55f2bed1
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ type Client struct {
// addr is the address of form <ip>:<port> that we expect to receive // addr is the address of form <ip>:<port> that we expect to receive
// RTP at. // RTP at.
func NewClient(addr string) (*Client, error) { func NewClient(addr string) (*Client, error) {
c := &Client{} c := &Client{r: &PacketReader{}}
a, err := net.ResolveUDPAddr("udp", addr) a, err := net.ResolveUDPAddr("udp", addr)
if err != nil { if err != nil {