I have used AVPictureInPictureController in my project for a long time. However, I started to get a few crashes every day recently from firebase, and I don't think it provides too much information.
My code snippets:
self.myPlayerLayer = [AVSampleBufferDisplayLayer layer];
- (void)setupPictureInPictureController {
AVPictureInPictureControllerContentSource *source = [[AVPictureInPictureControllerContentSource alloc] initWithSampleBufferDisplayLayer:self.myPlayerLayer] playbackDelegate:self];
self.pipController = [[AVPictureInPictureController alloc] initWithContentSource:source]; // <- Crash at this line
self.pipController.delegate = self;
self.pipController.canStartPictureInPictureAutomaticallyFromInline = YES;
[self.pipController setValue:[NSNumber numberWithInt:1] forKey:@"controlsStyle"];
}
Firebase shows the crash happens at self.pipController = [[AVPictureInPictureController alloc] initWithContentSource:source], and I can't get any clues from the trace.
Does anyone have the same issue?
