void OBS::StopRecording() { if(!bRecording) return; VideoFileStream *tempStream = NULL; tempStream = fileStream; // Prevent the encoder thread from trying to write to fileStream while it's closing fileStream = NULL; delete tempStream; tempStream = NULL; bRecording = false; ReportStopRecordingTrigger(); SetWindowText(GetDlgItem(hwndMain, ID_TOGGLERECORDING), Str("MainWindow.StartRecording")); if(!bStreaming) Stop(); }
void OBS::StopRecording() { if (!bStreaming && !bRecordingReplayBuffer && bRunning && bRecording) Stop(true); if(!bRecording) return; VideoFileStream *tempStream = NULL; tempStream = fileStream; // Prevent the encoder thread from trying to write to fileStream while it's closing fileStream = NULL; delete tempStream; tempStream = NULL; bRecording = false; ReportStopRecordingTrigger(); ConfigureStreamButtons(); }