• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
async loading crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: async loading crash
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: How to get bookmarks data for non-existing files
  • Next by Date: Re: Lion's 'restore windows' vs. app with initial 'login'
  • Previous by thread: Re: How to get bookmarks data for non-existing files
  • Next by thread: Re: async loading crash
  • Index(es):
    • Date
    • Thread