Add rtcp.RawPacket type

This will be returned by Unmarhsal when an unknown type is seen
in the packet stream, avoiding an error and allowing the user to
write their own packet handling code for that type if desired.

Relates to #119
This commit is contained in:
Max Hawkins
2018-12-02 11:15:56 -08:00
committed by Woodrow Douglass
parent bcc7ae2061
commit 5655d151b1
3 changed files with 87 additions and 2 deletions

View File

@@ -36,10 +36,9 @@ func Unmarshal(rawPacket []byte) (Packet, Header, error) {
p = new(PictureLossIndication)
default:
return nil, h, errWrongType
p = new(RawPacket)
}
err = p.Unmarshal(rawPacket)
return p, h, err
}