From 4ef30b5b0399e16366bdb76aa1921cbfb5c0d520 Mon Sep 17 00:00:00 2001 From: Matthew Gregan Date: Mon, 11 Aug 2014 13:21:17 +1200 Subject: [PATCH] Bug 1049317 - SBR::ReadFromCache forgot to reset offset. r=cajbir --- content/media/mediasource/SourceBufferResource.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content/media/mediasource/SourceBufferResource.cpp b/content/media/mediasource/SourceBufferResource.cpp index d54cc7d5b72e..315982602c39 100644 --- a/content/media/mediasource/SourceBufferResource.cpp +++ b/content/media/mediasource/SourceBufferResource.cpp @@ -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