hap-in-avfoundation
hap-in-avfoundation copied to clipboard
Crash when activating OutputAsRGB
The following file makes crash VDMX, Millumin, Qlab, ... The issue may happen when generating the thumbnail, so using OutputAsRGB. Crash when activating OutputAsRGB.mov.zip (for info, this fiole was generated with Syphon Recorder)
Small program to reproduce the issue :
for(int i=0; i<100; i++)
{
NSURL *url = [[NSURL alloc] initFileURLWithPath:@"video.mov"];
AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:url options:nil];
AVPlayerItemHapDXTOutput *hapOutput = [[AVPlayerItemHapDXTOutput alloc] initWithHapAssetTrack:asset.hapVideoTracks.firstObject];
hapOutput.outputAsRGB = YES;
HapDecoderFrame *dxtFrame = [hapOutput allocFrameForTime:kCMTimeZero]; // it will crash there at some point
NSLog(@"=> %@", dxtFrame);
[NSThread sleepForTimeInterval:1];
}
Can confirm that - I was running into the same issue a while ago, but forgot to report it back :/