MCPcopy Create free account
hub / github.com/pion/rtp / DelExtension

Method DelExtension

packet.go:437–448  ·  view source on GitHub ↗

DelExtension Removes an RTP Header extension

(id uint8)

Source from the content-addressed store, hash-verified

435
436// DelExtension Removes an RTP Header extension
437func (h *Header) DelExtension(id uint8) error {
438 if !h.Extension {
439 return errHeaderExtensionsNotEnabled
440 }
441 for i, extension := range h.Extensions {
442 if extension.id == id {
443 h.Extensions = append(h.Extensions[:i], h.Extensions[i+1:]...)
444 return nil
445 }
446 }
447 return errHeaderExtensionNotFound
448}
449
450// Marshal serializes the packet into bytes.
451func (p *Packet) Marshal() (buf []byte, err error) {

Calls

no outgoing calls