check stream index when parse block
This commit is contained in:
parent
e9a3828572
commit
f4d9ad60ac
@ -562,6 +562,10 @@ func (self *Client) parseBlock(blockNo int, packet []byte) (streamIndex int, err
|
||||
}
|
||||
|
||||
streamIndex = blockNo/2
|
||||
if streamIndex >= len(self.streams) {
|
||||
err = fmt.Errorf("rtsp: parseBlock: streamIndex=%d invalid", streamIndex)
|
||||
return
|
||||
}
|
||||
stream := self.streams[streamIndex]
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user