title: RTCVideoCapturer capturerWithDeviceName:(NSString*) becomes very slow after subsequent calls
body: <p>I'm building a <code>webrtc</code> based <code>voip</code> app. I call the following code before each call I make:  </p>
  
  <pre><code>NSMutableArray *m = [[NSMutableArray alloc] init];
  NSMutableArray *o = [[NSMutableArray alloc] init];
  
  //[m addObject:[[RTCPair alloc] initWithKey:@"maxFrameRate" value:@"30"]];
  //[m addObject:[[RTCPair alloc] initWithKey:@"maxFrameRate" value:@"24"]];
  //[m addObject:[[RTCPair alloc] initWithKey:@"maxHeight" value:@"180"]];
  NSString* cameraID = nil;
  for (AVCaptureDevice *captureDevice in [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]) {
      if (captureDevice.position == AVCaptureDevicePositionFront) {
          cameraID = [captureDevice localizedName];
          break;
      }
  }
  
  capturer = [RTCVideoCapturer capturerWithDeviceName:cameraID]; //why so slow :(
  
  RTCMediaConstraints *videoConstraints = [[RTCMediaConstraints alloc] initWithMandatoryConstraints:m optionalConstraints:o];
  videoSource = [peerConnectionFactory videoSourceWithCapturer:capturer constraints:videoConstraints];
  
  localVideoTrack = [peerConnectionFactory videoTrackWithID:@"ARDAMSv0" source:videoSource];
  
  lms = [peerConnectionFactory mediaStreamWithLabel:@"ARDAMS"];
  
  if (localVideoTrack) [lms addVideoTrack:localVideoTrack];
  [lms addAudioTrack:[peerConnectionFactory audioTrackWithID:@"ARDAMSa0"]];
  
  [peerConnection addStream:lms constraints:[[RTCMediaConstraints alloc] init]];
  
  dispatch_async(dispatch_get_main_queue(), ^{
      [callViewController setLocalVideo];
  });
  </code></pre>
  
  <p>After the call ends I reset all these variables (mostly just set them to nil). I've seen this approach work very well, but recently a bug has sneaked in there. Every subsequent call increases the execution time of this line  </p>
  
  <pre><code>capturer = [RTCVideoCapturer capturerWithDeviceName:cameraID];
  </code></pre>
  
  <p>I tried setting the capturer just once at the start of the app, but then the app crashes on  </p>
  
  <pre><code>videoSource = [peerConnectionFactory videoSourceWithCapturer:capturer constraints:videoConstraints];  
  </code></pre>
  
  <p>even though all parameters are initialized (I checked using the debugger).  </p>
  
  <p>Does anybody have an idea as to what this could be? I'm sure this same code worked perfectly before. I did not update the <code>webrtc</code> library, <code>xcode</code> or <code>iOS</code>.</p>