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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to