Bug 891722 - Media Recording - The rate of ondataavailable events spikes adnormally high after starting, stopping, and starting recording again. r=roc

This commit is contained in:
Randy Lin 2013-07-14 15:04:10 +08:00
parent cbc093a476
commit 00842ad22a

View File

@ -185,9 +185,7 @@ MediaRecorder::Start(const Optional<int32_t>& aTimeSlice, ErrorResult& aResult)
mEncodedBufferCache = new EncodedBufferCache(MAX_ALLOW_MEMORY_BUFFER);
}
if (mEncoder == nullptr) {
mEncoder = MediaEncoder::CreateEncoder(NS_LITERAL_STRING(""));
}
mEncoder = MediaEncoder::CreateEncoder(NS_LITERAL_STRING(""));
MOZ_ASSERT(mEncoder, "CreateEncoder failed");
mTrackUnionStream->SetAutofinish(true);