Nicolas Manzini
Nicolas Manzini

Reputation: 8546

AVAssetWriter startSessionAtSourceTime: Cannot call method when status is 0

Well I happily discovered that my app crash on the version downloaded from the Apple AppStore whereas it never did before. looking at the log I get the exception

AVAssetWriter startSessionAtSourceTime: Cannot call method when status is 0

Obviously this error does not occur in debug mode. But it never did in release mode before in a code that was shipped with another app and available on the appStore.

Could it be the directoryForTemporaryFiles added in iOS 8 the responsible for this status 0 ?

Upvotes: 7

Views: 6666

Answers (2)

pusswzy
pusswzy

Reputation: 37

[AVAssetWriter assetWriterWithURL:[NSURL fileURLWithPath:writePath] fileType:AVFileTypeQuickTimeMovie error:nil];

Maybe the issue is on fileType. Make sure to select the correct filetype.

Upvotes: 0

Mohammed
Mohammed

Reputation: 1504

Calling startWriting() method before startSessionAtSourceTime() should solve your problem.

Upvotes: 6

Related Questions