Bug 881512 - Don't pretend the entire resource is always completely cached. r=cajbir
authorMatthew Gregan <kinetik@flim.org>
Tue, 22 Apr 2014 01:32:00 +1200
changeset 180743 c116a4499d82d2fd95ef6a0544cc2a1ecb456714
parent 180742 5ea033583b20024305a1c85cbb642f12be593963
child 180744 199c040d09f0ff14b4a10129e99effe0ec59166f
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewerscajbir
bugs881512
milestone31.0a1
Bug 881512 - Don't pretend the entire resource is always completely cached. r=cajbir
content/media/mediasource/MediaSourceResource.h
--- a/content/media/mediasource/MediaSourceResource.h
+++ b/content/media/mediasource/MediaSourceResource.h
@@ -31,17 +31,17 @@ public:
   virtual void EndSeekingForMetadata() MOZ_OVERRIDE {}
   virtual int64_t Tell() MOZ_OVERRIDE { return -1; }
   virtual void Pin() MOZ_OVERRIDE {}
   virtual void Unpin() MOZ_OVERRIDE {}
   virtual double GetDownloadRate(bool* aIsReliable) MOZ_OVERRIDE { return 0; }
   virtual int64_t GetLength() MOZ_OVERRIDE { return -1; }
   virtual int64_t GetNextCachedData(int64_t aOffset) MOZ_OVERRIDE { return aOffset; }
   virtual int64_t GetCachedDataEnd(int64_t aOffset) MOZ_OVERRIDE { return GetLength(); }
-  virtual bool IsDataCachedToEndOfResource(int64_t aOffset) MOZ_OVERRIDE { return true; }
+  virtual bool IsDataCachedToEndOfResource(int64_t aOffset) MOZ_OVERRIDE { return false; }
   virtual bool IsSuspendedByCache() MOZ_OVERRIDE { return false; }
   virtual bool IsSuspended() MOZ_OVERRIDE { return false; }
   virtual nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) MOZ_OVERRIDE { return NS_ERROR_FAILURE; }
   virtual nsresult Open(nsIStreamListener** aStreamListener) MOZ_OVERRIDE { return NS_ERROR_FAILURE; }
 
   virtual nsresult GetCachedRanges(nsTArray<MediaByteRange>& aRanges) MOZ_OVERRIDE
   {
     aRanges.AppendElement(MediaByteRange(0, GetLength()));