From 89cd1bb85be60f205c917bee8ae578334258f3d3 Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 31 Jan 2012 15:26:35 -0800 Subject: [PATCH] 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 --- src/dec/idec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dec/idec.c b/src/dec/idec.c index fdce8839..8765ba04 100644 --- a/src/dec/idec.c +++ b/src/dec/idec.c @@ -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; }