mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
idec: fix WebPIUpdate failure
If the first call to WebPIUpdate contained all of partition 0, but not enough to decode a macroblock the test for max macro block size could fail (4096 bytes) due to a memory buffer offset not being updated. This change offsets the buffer in the same manner as Append(). Fixes issue #105. Change-Id: I90ca3d0dde92eedc076933b8349d2d297f2469e8
This commit is contained in:
parent
01b6380656
commit
89cd1bb85b
@ -310,12 +310,12 @@ static int CopyParts0Data(WebPIDecoder* idec) {
|
||||
}
|
||||
memcpy(part0_buf, br->buf_, psize);
|
||||
mem->part0_buf_ = part0_buf;
|
||||
mem->start_ += psize;
|
||||
br->buf_ = part0_buf;
|
||||
br->buf_end_ = part0_buf + psize;
|
||||
} else {
|
||||
// Else: just keep pointers to the partition #0's data in dec_->br_.
|
||||
}
|
||||
mem->start_ += psize;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user