title: iOS 5 - AVCaptureDevice setting focus point and focus mode freezes the live camera picture
body: <p>I'm using the following method to set point of focus since iOS 4:</p>
  
  <pre><code>- (void) focusAtPoint:(CGPoint)point
  {
      AVCaptureDevice *device = [[self captureInput] device];
  
      NSError *error;
  
       if ([device isFocusModeSupported:AVCaptureFocusModeAutoFocus] &amp;&amp;
           [device isFocusPointOfInterestSupported])
       {
           if ([device lockForConfiguration:&amp;error]) {
               [device setFocusPointOfInterest:point];
               [device setFocusMode:AVCaptureFocusModeAutoFocus];
               [device unlockForConfiguration];
           } else {
               NSLog(@"Error: %@", error);
           }
       }
  }
  </code></pre>
  
  <p>On iOS 4 devices this works without any problems. But on iOS 5 the live camera feed freezes and after some seconds gets completely black. There is no exception or error thrown.</p>
  
  <p>The error won't occur if I comment out either setFocusPointOfInterest or setFocusMode. So the combination of them both will lead to this behavior.</p>