Closed saschanaz closed 7 years ago
Is there some situation that decode_over=true but quality<10000?
Yes, when the bitstream is truncated.
If that happen probably the callback with decode_over=true is the last callback. Still not 100% sure when I may skip preview, can I expect:
?
If yes on 2, what would the previous callback look like?
decode_over==true
will always be the last callback.
Whether to skip that depends on how you use the API. In viewflif
only the preview_images are displayed, not the fully decoded images! So the last preview (which will be same as decoded image) is never skipped.
However, in Poly-FLIF, the decoded image is shown at the end. Hence, it skips the last preview callback.
I hope that makes sense. IMO, since you are using the FLIF C API in libflif.js
just as viewflif
does, you could follow the logic employed in viewflif
.
The PR #400 said some clients can skip preview when decode_over=true, but I'm not getting it. Is there some situation that decode_over=true but quality<10000?