From 8a806e3ee9f7ebfefd0c7baa1919f3213c6baaf7 Mon Sep 17 00:00:00 2001 From: "reed@reedloden.com" Date: Fri, 25 Jan 2008 00:00:18 -0800 Subject: [PATCH] Bug 363986 - "nsJPEGEncoder::ReadSegments() and nsPNGEncoder::ReadSegments() do not advance read pointer" [p=daim.project@free.fr (David Marteau) r=stuart sr=bzbarsky a1.9=beltzner a=blocking1.9+] --- modules/libpr0n/encoders/jpeg/nsJPEGEncoder.cpp | 2 +- modules/libpr0n/encoders/png/nsPNGEncoder.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.cpp b/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.cpp index 71c89999141..77120f53a40 100644 --- a/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.cpp +++ b/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.cpp @@ -266,7 +266,7 @@ NS_IMETHODIMP nsJPEGEncoder::ReadSegments(nsWriteSegmentFun aWriter, void *aClos aCount = maxCount; nsresult rv = aWriter(this, aClosure, reinterpret_cast(mImageBuffer), - 0, aCount, _retval); + mImageBufferReadPoint, aCount, _retval); if (NS_SUCCEEDED(rv)) { NS_ASSERTION(*_retval <= aCount, "bad write count"); mImageBufferReadPoint += *_retval; diff --git a/modules/libpr0n/encoders/png/nsPNGEncoder.cpp b/modules/libpr0n/encoders/png/nsPNGEncoder.cpp index 834017ca349..3b5cd56930f 100644 --- a/modules/libpr0n/encoders/png/nsPNGEncoder.cpp +++ b/modules/libpr0n/encoders/png/nsPNGEncoder.cpp @@ -484,7 +484,7 @@ NS_IMETHODIMP nsPNGEncoder::ReadSegments(nsWriteSegmentFun aWriter, aCount = maxCount; nsresult rv = aWriter(this, aClosure, reinterpret_cast(mImageBuffer), - 0, aCount, _retval); + mImageBufferReadPoint, aCount, _retval); if (NS_SUCCEEDED(rv)) { NS_ASSERTION(*_retval <= aCount, "bad write count"); mImageBufferReadPoint += *_retval;