Bug 1364001. P2 - throttle download when we can play through.
MozReview-Commit-ID: HqRtwCAr7k3
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1054,16 +1054,17 @@ MediaDecoder::NotifySuspendedStatusChang
void
MediaDecoder::NotifyBytesDownloaded()
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_DIAGNOSTIC_ASSERT(!IsShutdown());
UpdatePlaybackRate();
GetOwner()->DownloadProgressed();
+ mResource->ThrottleReadahead(CanPlayThrough());
}
void
MediaDecoder::NotifyDownloadEnded(nsresult aStatus)
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_DIAGNOSTIC_ASSERT(!IsShutdown());