async loading crash
async loading crash
- Subject: async loading crash
- From: "Jan E. Schotsman" <email@hidden>
- Date: Wed, 08 Feb 2012 15:00:34 +0100
Hello,
I am loading a movie and intend to process it when the duration
property has loaded.
Unfortunately the thread
"com.apple.coremedia.formatreaderloader.makereadyforinspection"
crashes in pthread_mutex_unlock after running the processMovie method.
Can anybody see what is wrong?
This is a 64bit project using AVFoundation.
NSDictionary *options = [NSDictionary
dictionaryWithObject:myYesNumber
forKey:AVURLAssetPreferPreciseDurationAndTimingKey];
AVURLAsset *movieAsset = [AVURLAsset URLAssetWithURL:movieURL
options:options];
// load duration asynchronously
NSArray *keys = [NSArray arrayWithObject:@"duration"];
void(^loadHandler)(void) = ^(void)
{
NSError *error;
AVKeyValueStatus status = [movieAsset
statusOfValueForKey:@"duration" error:&error];
if ( status == AVKeyValueStatusLoaded )
{
[self performSelectorOnMainThread:@selector(processMovie:)
withObject:movieAsset waitUntilDone:YES];
}
};
[movieAsset loadValuesAsynchronouslyForKeys:keys
completionHandler:loadHandler];
TIA,
Jan E.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden