--- a/dom/media/MediaDecoderReader.h+++ b/dom/media/MediaDecoderReader.h@@ -261,16 +261,18 @@ public: } // Returns true if the reader implements RequestAudioData() // and RequestVideoData() asynchronously, rather than using the // implementation in this class to adapt the old synchronous to // the newer async model. virtual bool IsAsync() const { return false; }+ virtual void DisableHardwareAcceleration() {}+ protected: virtual ~MediaDecoderReader(); // Overrides of this function should decodes an unspecified amount of // audio data, enqueuing the audio data in mAudioQueue. Returns true // when there's more audio to decode, false if the audio is finished, // end of file has been reached, or an un-recoverable read error has // occured. This function blocks until the decode is complete.

--- a/dom/media/mediasource/MediaSourceReader.h+++ b/dom/media/mediasource/MediaSourceReader.h@@ -79,16 +79,22 @@ public: bool HasAudio() MOZ_OVERRIDE { return mInfo.HasAudio(); } void NotifyTimeRangesChanged();+ virtual void DisableHardwareAcceleration() MOZ_OVERRIDE {+ if (GetVideoReader()) {+ GetVideoReader()->DisableHardwareAcceleration();+ }+ }+ // We can't compute a proper start time since we won't necessarily // have the first frame of the resource available. This does the same // as chrome/blink and assumes that we always start at t=0. virtual int64_t ComputeStartTime(const VideoData* aVideo, const AudioData* aAudio) MOZ_OVERRIDE { return 0; } // Buffering heuristics don't make sense for MSE, because the arrival of data // is at least partly controlled by javascript, and javascript does not expect // us to sit on unplayed data just because it may not be enough to play