Fix a crash when AVAssetWriter is in status failed.