Bug 1049317 - SBR::ReadFromCache forgot to reset offset. r=cajbir

This commit is contained in:
Matthew Gregan 2014-08-11 13:21:17 +12:00
parent 3b90d46458
commit 4ef30b5b03

View File

@ -133,7 +133,10 @@ SourceBufferResource::ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCo
{
SBR_DEBUG("SourceBufferResource(%p)::ReadFromCache(aBuffer=%p, aOffset=%lld, aCount=%u)",
this, aBuffer, aOffset, aCount);
return ReadAt(aOffset, aBuffer, aCount, nullptr);
int64_t oldOffset = mOffset;
nsresult rv = ReadAt(aOffset, aBuffer, aCount, nullptr);
mOffset = oldOffset;
return rv;
}
bool