mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
lossless incremental decoding: fix missing eos_ test
The patch21735e0
introduced a bug where a goto path was not testing the eos_ state. If this happened just before a row_sync, a SaveState() would be called that would store the eos_ state as '1' till the end of the loop. This usually was not a problem, except for the very last chunk where we disable the incremental decoding altogether (we have all the data). The termination tests were then going wrong. The fix is to add a proper eos_ test and avoid falling in this inconsistent state. (21735e06f7
) BUG=webp:332 Change-Id: Ib16773aee26bfd068fbf4e9db3d2313bd978b269
This commit is contained in:
parent
75a9c3c452
commit
f8fad4fac1
@ -1091,6 +1091,7 @@ static int DecodeImageData(VP8LDecoder* const dec, uint32_t* const data,
|
|||||||
VP8LFillBitWindow(br);
|
VP8LFillBitWindow(br);
|
||||||
if (htree_group->use_packed_table) {
|
if (htree_group->use_packed_table) {
|
||||||
code = ReadPackedSymbols(htree_group, br, src);
|
code = ReadPackedSymbols(htree_group, br, src);
|
||||||
|
if (VP8LIsEndOfStream(br)) break;
|
||||||
if (code == PACKED_NON_LITERAL_CODE) goto AdvanceByOne;
|
if (code == PACKED_NON_LITERAL_CODE) goto AdvanceByOne;
|
||||||
} else {
|
} else {
|
||||||
code = ReadSymbol(htree_group->htrees[GREEN], br);
|
code = ReadSymbol(htree_group->htrees[GREEN], br);
|
||||||
|
Loading…
Reference in New Issue
Block a user