diff --git a/content/media/MediaRecorder.cpp b/content/media/MediaRecorder.cpp index dc2faf40955..ac21747f020 100644 --- a/content/media/MediaRecorder.cpp +++ b/content/media/MediaRecorder.cpp @@ -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