Bug 1447273 - Consider all AudioChunk members in AudioChunk::CanCombineWithFollowing. r?padenot
MozReview-Commit-ID: 1Fz1GNxRF3P
--- a/dom/media/AudioSegment.h
+++ b/dom/media/AudioSegment.h
@@ -168,16 +168,22 @@ struct AudioChunk {
bool CanCombineWithFollowing(const AudioChunk& aOther) const
{
if (aOther.mBuffer != mBuffer) {
return false;
}
if (!mBuffer) {
return true;
}
+ if (aOther.mVolume != mVolume) {
+ return false;
+ }
+ if (aOther.mPrincipalHandle != mPrincipalHandle) {
+ return false;
+ }
NS_ASSERTION(aOther.mBufferFormat == mBufferFormat,
"Wrong metadata about buffer");
NS_ASSERTION(aOther.mChannelData.Length() == mChannelData.Length(),
"Mismatched channel count");
if (mDuration > INT32_MAX) {
return false;
}
for (uint32_t channel = 0; channel < mChannelData.Length(); ++channel) {