mirror of https://bitbucket.org/ausocean/av.git
codec/mjpeg/jpeg.go: simplified if statement
This commit is contained in:
parent
c42d58ea85
commit
210d368adb
|
@ -223,11 +223,9 @@ func (c *Context) ParsePayload(p []byte, m bool) error {
|
||||||
if qLen > 0 {
|
if qLen > 0 {
|
||||||
qTable = b.getBuf(qLen)
|
qTable = b.getBuf(qLen)
|
||||||
|
|
||||||
if q < 255 {
|
if q < 255 && c.qTablesLen[q-128] == 0 && qLen <= 128 {
|
||||||
if c.qTablesLen[q-128] == 0 && qLen <= 128 {
|
copy(c.qTables[q-128][:], qTable)
|
||||||
copy(c.qTables[q-128][:], qTable)
|
c.qTablesLen[q-128] = byte(qLen)
|
||||||
c.qTablesLen[q-128] = byte(qLen)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if q == 255 {
|
if q == 255 {
|
||||||
|
|
Loading…
Reference in New Issue