StartCaptureJob needs a critical section before line 98:
String recordingID = captureAgentImpl.startCapture(mediaPackage, properties);
And we need to check to make sure that the end date is still reasonable.