LibGfx: Don't reject valid GIF animations with interlaced frames
We were returning early from the deinterlacing loop after the very last pass, but we should just let the outer loop finish and return instead. This makes the Netscape animation on https://timmorgan.dev work. :^)
This commit is contained in:
parent
dff808d087
commit
57e10eadac
Notes:
sideshowbarker
2024-07-18 22:33:31 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/57e10eadac0
1 changed files with 2 additions and 4 deletions
|
@ -401,10 +401,8 @@ static bool decode_frame(GIFLoadingContext& context, size_t frame_index)
|
|||
if (image.interlaced) {
|
||||
if (row + INTERLACE_ROW_STRIDES[interlace_pass] >= image.height) {
|
||||
++interlace_pass;
|
||||
// FIXME: We could probably figure this out earlier and fail before doing a bunch of work.
|
||||
if (interlace_pass >= 4)
|
||||
return false;
|
||||
row = INTERLACE_ROW_OFFSETS[interlace_pass];
|
||||
if (interlace_pass < 4)
|
||||
row = INTERLACE_ROW_OFFSETS[interlace_pass];
|
||||
} else {
|
||||
row += INTERLACE_ROW_STRIDES[interlace_pass];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue