From 5acacf04654ceacc1eda6993d737d9f05e4ae26a Mon Sep 17 00:00:00 2001 From: Randy Lin Date: Sun, 14 Jul 2013 15:04:10 +0800 Subject: [PATCH] Bug 891722 - Media Recording - The rate of ondataavailable events spikes adnormally high after starting, stopping, and starting recording again. r=roc --- content/media/MediaRecorder.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/media/MediaRecorder.cpp b/content/media/MediaRecorder.cpp index adbb61689c7e..32e1992c3514 100644 --- a/content/media/MediaRecorder.cpp +++ b/content/media/MediaRecorder.cpp @@ -185,9 +185,7 @@ MediaRecorder::Start(const Optional& 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);