Skip to content

Commit

Permalink
[starter] avoid not cleaning up ffmpeg screen recorders on Linux in c…
Browse files Browse the repository at this point in the history
…ase `start` was called several times

GitOrigin-RevId: 882dd946cb6ab31d190dc9228e90a904cb1cc1c9
  • Loading branch information
anastakats authored and intellij-monorepo-bot committed Oct 29, 2024
1 parent b48f11f commit 902c0a6
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,13 @@ class IDEScreenRecorder(private val runContext: IDERunContext) {
javaScreenRecorder?.start()
}
else if (SystemInfo.isLinux) {
ffmpegProcess = runCatching { startFFMpegRecording(runContext) }.getOrElse {
logOutput("Can't start ffmpeg recording: ${it.message}")
null
synchronized(this) {
if (ffmpegProcess == null) {
ffmpegProcess = runCatching { startFFMpegRecording(runContext) }.getOrElse {
logOutput("Can't start ffmpeg recording: ${it.message}")
null
}
}
}
}
}
Expand Down

0 comments on commit 902c0a6

Please sign in to comment.