Bug 900419 - Media Recording - MediaRecorder's state is wrong when stopping media stream during recording. r=roc

This commit is contained in:
Randy Lin 2013-08-01 18:38:57 +08:00
parent 261b23f442
commit 9e2e522185

View File

@ -89,6 +89,7 @@ public:
NS_IMETHODIMP Run()
{
MOZ_ASSERT(NS_IsMainThread());
mRecorder->mState = RecordingState::Inactive;
mRecorder->DispatchSimpleEvent(NS_LITERAL_STRING("stop"));
mRecorder->mReadThread->Shutdown();
mRecorder->mReadThread = nullptr;
@ -228,7 +229,6 @@ MediaRecorder::Stop(ErrorResult& aResult)
return;
}
mTrackUnionStream->RemoveListener(mEncoder);
mState = RecordingState::Inactive;
}
void