mirror of https://bitbucket.org/ausocean/av.git
codec/h265: got rid of _d in handleFragmentation
This commit is contained in:
parent
6435b3c55f
commit
e44d936315
|
@ -147,24 +147,24 @@ func (l *Lexer) handleAggregation(d []byte) {
|
||||||
// handleFragmentation parses NAL units from fragmentation packets and writes
|
// handleFragmentation parses NAL units from fragmentation packets and writes
|
||||||
// them to the Lexer's buf.
|
// them to the Lexer's buf.
|
||||||
func (l *Lexer) handleFragmentation(d []byte) {
|
func (l *Lexer) handleFragmentation(d []byte) {
|
||||||
_d := d[3:]
|
|
||||||
if l.donl {
|
|
||||||
_d = d[5:]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get start and end indiciators from FU header.
|
// Get start and end indiciators from FU header.
|
||||||
start := d[2]&0x80 != 0
|
start := d[2]&0x80 != 0
|
||||||
end := d[2]&0x40 != 0
|
end := d[2]&0x40 != 0
|
||||||
|
|
||||||
|
d = d[3:]
|
||||||
|
if l.donl {
|
||||||
|
d = d[2:]
|
||||||
|
}
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case start && !end:
|
case start && !end:
|
||||||
l.frag = true
|
l.frag = true
|
||||||
l.writeWithPrefix(_d)
|
l.writeWithPrefix(d)
|
||||||
case !start && end:
|
case !start && end:
|
||||||
l.frag = false
|
l.frag = false
|
||||||
fallthrough
|
fallthrough
|
||||||
case !start && !end:
|
case !start && !end:
|
||||||
l.writeNoPrefix(_d)
|
l.writeNoPrefix(d)
|
||||||
default:
|
default:
|
||||||
panic("bad fragmentation packet")
|
panic("bad fragmentation packet")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue