![](/img/trans.png)
[英]AVAssetWriter startWriting Cannot call method when status is 3
[英]AVAssetWriter startSessionAtSourceTime: Cannot call method when status is 0
好吧,我很高興地發現我的應用程序崩潰了從Apple AppStore下載的版本,而以前從未做過。 看着日志我得到了例外
AVAssetWriter startSessionAtSourceTime: Cannot call method when status is 0
顯然,在調試模式下不會發生此錯誤。 但它之前在發布模式中從未在另一個應用程序附帶的代碼中運行,並且可以在appStore上使用。
可能是在iOS 8
添加的directoryForTemporaryFiles
負責此狀態0嗎?
在startSessionAtSourceTime()
之前調用startWriting()
方法應該可以解決您的問題。
[AVAssetWriter assetWriterWithURL:[NSURL fileURLWithPath:writePath] fileType:AVFileTypeQuickTimeMovie error:nil];
也許問題出在fileType上。 確保選擇正確的文件類型。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.