This commit is contained in:
Ryan Oldenburg 2022-05-25 19:35:28 -05:00
parent 297ddc6c60
commit d49ef8be19

View file

@ -446,8 +446,6 @@ proc decodeSOS(state: var DecoderState) =
state.successiveApproxLow = aa and 15
state.successiveApproxHigh = aa shr 4
state.reset()
if state.progressive:
if state.spectralStart > 63 or state.spectralEnd > 63:
failInvalid()
@ -467,6 +465,8 @@ proc decodeSOS(state: var DecoderState) =
if len != 0:
failInvalid()
state.reset()
proc fillBitBuffer(state: var DecoderState) =
## When we are low on bits, we need to call this to populate some more.
while state.bitsBuffered < 24: