Bug 995543 - Unbreak libc++ build after bug 982490 by using more portable mozilla::Abs. r=jesup

This commit is contained in:
Jan Beich 2014-04-13 15:41:07 -04:00
parent 5f8d38d2b4
commit 306d4e2156

View File

@ -5,6 +5,7 @@
#include "MediaStreamGraphImpl.h"
#include "mozilla/LinkedList.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/unused.h"
#include "AudioSegment.h"
@ -903,7 +904,7 @@ MediaStreamGraphImpl::PlayAudio(MediaStream* aStream,
if (audioOutput.mLastTickWritten != offset) {
// If there is a global underrun of the MSG, this property won't hold, and
// we reset the sample count tracking.
if (std::abs(audioOutput.mLastTickWritten - offset) != 1) {
if (mozilla::Abs(audioOutput.mLastTickWritten - offset) != 1) {
audioOutput.mLastTickWritten = offset;
} else {
offset = audioOutput.mLastTickWritten;