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