Bug 1178725 - Fix create videoFrameContainer crash on B2G desktop. r=roc
authorDaosheng Mu <daoshengmu@gmail.com>
Wed, 05 Aug 2015 20:02:00 +0200
changeset 288211 e377cd3e0784de884791d5352f81ca2e2f10d215
parent 288210 3512c2ff8219003c159b528cb4c65fd26ad71f89
child 288212 8ea5c69ae101d01a32717cd543b7a78596261c17
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1178725
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1178725 - Fix create videoFrameContainer crash on B2G desktop. r=roc
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -3090,17 +3090,21 @@ void HTMLMediaElement::SetupSrcMediaStre
   }
 
   ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_IDLE);
 
   ChangeDelayLoadStatus(false);
   GetSrcMediaStream()->AddAudioOutput(this);
   SetVolumeInternal();
 
+#ifdef MOZ_WIDGET_GONK
   bool bUseOverlayImage = mSrcStream->AsDOMHwMediaStream() != nullptr;
+#else
+  bool bUseOverlayImage = false;
+#endif
   VideoFrameContainer* container;
 
   if (bUseOverlayImage) {
     container = GetOverlayImageVideoFrameContainer();
   }
   else {
     container = GetVideoFrameContainer();
   }