mirror of https://bitbucket.org/ausocean/av.git
codec/h264/lex.go: using if and else statements rather than switch for start and end indicator logic in handleFUA
This commit is contained in:
parent
0e7504374e
commit
35069bd4f3
|
@ -274,17 +274,17 @@ func (l *RTPLexer) handleFUA(d []byte) {
|
||||||
d = d[2:]
|
d = d[2:]
|
||||||
}
|
}
|
||||||
|
|
||||||
switch {
|
if start {
|
||||||
case start && !end:
|
if end {
|
||||||
|
panic("bad fragmentation packet")
|
||||||
|
}
|
||||||
l.frag = true
|
l.frag = true
|
||||||
l.writeWithPrefix(d)
|
l.writeWithPrefix(d)
|
||||||
case !start && end:
|
} else {
|
||||||
l.frag = false
|
if end {
|
||||||
fallthrough
|
l.frag = false
|
||||||
case !start && !end:
|
}
|
||||||
l.writeNoPrefix(d)
|
l.writeNoPrefix(d)
|
||||||
default:
|
|
||||||
panic("bad fragmentation packet")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue