Bug 1370598 - Don't cap latency at 512 frames on Macs that are not Macbooks or Macbook Air. r=achronop
authorPaul Adenot <paul@paul.cx>
Tue, 16 Jan 2018 16:44:34 +0100
changeset 453758 f745765d92c46e5b257ea48470bf02fcf691a7da
parent 453757 f77e243145f2c08e6f7ba4f086400e874aad9463
child 453759 598e806c183d39f631db98cb164d77d44e6f093e
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersachronop
bugs1370598
milestone59.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 1370598 - Don't cap latency at 512 frames on Macs that are not Macbooks or Macbook Air. r=achronop MozReview-Commit-ID: LEquEPECH9P
dom/media/GraphDriver.cpp
--- a/dom/media/GraphDriver.cpp
+++ b/dom/media/GraphDriver.cpp
@@ -569,17 +569,17 @@ bool IsMacbookOrMacbookAir()
     // This string can be
     // MacBook%d,%d for a normal MacBook
     // MacBookPro%d,%d for a MacBook Pro
     // MacBookAir%d,%d for a Macbook Air
     sysctlbyname("hw.model", model.get(), &len, NULL, 0);
     char* substring = strstr(model.get(), "MacBook");
     if (substring) {
       const size_t offset = strlen("MacBook");
-      if (strncmp(model.get() + offset, "Air", len - offset) ||
+      if (!strncmp(model.get() + offset, "Air", 3) ||
           isdigit(model[offset + 1])) {
         return true;
       }
     }
     return false;
   }
 #endif
   return false;