From 414761835747d00bfe5717943a86fc27cabc73e4 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Wed, 20 Aug 2014 19:28:59 +0200 Subject: [PATCH] Bug 1055653 - Most MediaResource::GetDownloadRate() implementions ignore their out-parameter. r=cpearce. --HG-- extra : rebase_source : 67d5000c51740cedaad69fe22797589b6fcd06b4 --- content/media/BufferMediaResource.h | 2 +- content/media/RtspMediaResource.h | 2 +- content/media/mediasource/MediaSourceResource.h | 2 +- content/media/mediasource/SourceBufferResource.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/media/BufferMediaResource.h b/content/media/BufferMediaResource.h index a9927a0defe7..9e8844f111b6 100644 --- a/content/media/BufferMediaResource.h +++ b/content/media/BufferMediaResource.h @@ -106,7 +106,7 @@ private: virtual void Pin() {} virtual void Unpin() {} - virtual double GetDownloadRate(bool* aIsReliable) { return 0.; } + virtual double GetDownloadRate(bool* aIsReliable) { *aIsReliable = false; return 0.; } virtual int64_t GetLength() { return mLength; } virtual int64_t GetNextCachedData(int64_t aOffset) { return aOffset; } virtual int64_t GetCachedDataEnd(int64_t aOffset) { return mLength; } diff --git a/content/media/RtspMediaResource.h b/content/media/RtspMediaResource.h index 9ace173fa31e..606cb8c3edf7 100644 --- a/content/media/RtspMediaResource.h +++ b/content/media/RtspMediaResource.h @@ -146,7 +146,7 @@ public: virtual bool IsSuspended() MOZ_OVERRIDE { return false; } virtual bool IsTransportSeekable() MOZ_OVERRIDE { return true; } // dummy - virtual double GetDownloadRate(bool* aIsReliable) MOZ_OVERRIDE { return 0; } + virtual double GetDownloadRate(bool* aIsReliable) MOZ_OVERRIDE { *aIsReliable = false; return 0; } virtual int64_t GetLength() MOZ_OVERRIDE { if (mRealTime) { diff --git a/content/media/mediasource/MediaSourceResource.h b/content/media/mediasource/MediaSourceResource.h index cefd36731127..6e1920942224 100644 --- a/content/media/mediasource/MediaSourceResource.h +++ b/content/media/mediasource/MediaSourceResource.h @@ -32,7 +32,7 @@ public: 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 double GetDownloadRate(bool* aIsReliable) MOZ_OVERRIDE { *aIsReliable = false; 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(); } diff --git a/content/media/mediasource/SourceBufferResource.h b/content/media/mediasource/SourceBufferResource.h index 5ef220dc5a52..21171a8493c2 100644 --- a/content/media/mediasource/SourceBufferResource.h +++ b/content/media/mediasource/SourceBufferResource.h @@ -219,7 +219,7 @@ public: virtual int64_t Tell() MOZ_OVERRIDE { return mOffset; } virtual void Pin() MOZ_OVERRIDE {} virtual void Unpin() MOZ_OVERRIDE {} - virtual double GetDownloadRate(bool* aIsReliable) MOZ_OVERRIDE { return 0; } + virtual double GetDownloadRate(bool* aIsReliable) MOZ_OVERRIDE { *aIsReliable = false; return 0; } virtual int64_t GetLength() MOZ_OVERRIDE { return mInputBuffer.GetLength(); } virtual int64_t GetNextCachedData(int64_t aOffset) MOZ_OVERRIDE { return GetLength() == aOffset ? -1 : aOffset; } virtual int64_t GetCachedDataEnd(int64_t aOffset) MOZ_OVERRIDE { return GetLength(); }