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 f2d400265e
commit 5acacf0465

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);